Skip to content

Commit

Permalink
Merge pull request #340 from TheNeikos/update
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
TheNeikos authored Jan 8, 2025
2 parents 773f445 + 20aebf8 commit 0b95daa
Show file tree
Hide file tree
Showing 9 changed files with 169 additions and 192 deletions.
307 changes: 147 additions & 160 deletions Cargo.lock

Large diffs are not rendered by default.

34 changes: 13 additions & 21 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
{
description = "The CloudMQTT Rust library";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
nixpkgs.url = "nixpkgs/nixos-24.11";
flake-utils = {
url = "github:numtide/flake-utils";
};
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};

outputs = { self, nixpkgs, crane, flake-utils, rust-overlay, ... }:
outputs = { nixpkgs, crane, flake-utils, rust-overlay, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
Expand All @@ -34,7 +32,7 @@
unstableCraneLib = (crane.mkLib pkgs).overrideToolchain unstableRustTarget;

tomlInfo = craneLib.crateNameFromCargoToml { cargoToml = ./Cargo.toml; };
inherit (tomlInfo) pname version;
inherit (tomlInfo) version;
src = ./.;

rustfmt' = pkgs.writeShellScriptBin "rustfmt" ''
Expand Down
2 changes: 1 addition & 1 deletion mqtt-format/src/v5/integers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ where
.verify(|b: &u8| b & 0b1000_0000 == 0)
.context(winnow::error::StrContext::Label("last byte")),
);
let bytes = var_bytes.recognize().parse_next(input)?;
let bytes = var_bytes.take().parse_next(input)?;

let mut output: u32 = 0;

Expand Down
2 changes: 1 addition & 1 deletion mqtt-format/src/v5/packets/suback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl<'i> MSuback<'i> {
SubackReasonCode::parse,
winnow::combinator::eof,
)
.recognize()
.take()
.parse_next(input)?;

// SAFETY: We verified above that the payload slice only contains valid SubackReasonCode
Expand Down
2 changes: 1 addition & 1 deletion mqtt-format/src/v5/packets/subscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl<'i> Subscriptions<'i> {
Subscription::parse,
winnow::combinator::eof,
)
.recognize()
.take()
.parse_next(input)?;

Ok(Subscriptions { start })
Expand Down
2 changes: 1 addition & 1 deletion mqtt-format/src/v5/packets/unsuback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl<'i> MUnsuback<'i> {
UnsubackReasonCode::parse,
winnow::combinator::eof,
)
.recognize()
.take()
.parse_next(input)?;

// SAFETY: We verified above that the payload slice only contains valid UnsubackReasonCode
Expand Down
2 changes: 1 addition & 1 deletion mqtt-format/src/v5/packets/unsubscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl<'i> Unsubscriptions<'i> {
Unsubscription::parse,
winnow::combinator::eof,
)
.recognize()
.take()
.parse_next(input)?;

Ok(Unsubscriptions { start })
Expand Down
2 changes: 1 addition & 1 deletion mqtt-format/src/v5/variable_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ impl<'i> MqttProperties<'i> for UserProperties<'i> {
let slice = *input;

// We only need to verify there is a correct string pair
let _prop = UserProperty::parse.recognize().parse_next(input)?;
let _prop = UserProperty::parse.take().parse_next(input)?;

Ok(Self(slice))
})
Expand Down

0 comments on commit 0b95daa

Please sign in to comment.