diff --git a/devenv.lock b/devenv.lock index 1b827da0..7b0123a1 100644 --- a/devenv.lock +++ b/devenv.lock @@ -3,10 +3,10 @@ "devenv": { "locked": { "dir": "src/modules", - "lastModified": 1728452860, + "lastModified": 1736426010, "owner": "cachix", "repo": "devenv", - "rev": "e7a0bc559f5a66aaa42f5028db6162c4dd4587eb", + "rev": "1c384bc4be3ee571511fbbc6fdc94fe47d60f6cf", "type": "github" }, "original": { @@ -24,10 +24,10 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1728455642, + "lastModified": 1736490741, "owner": "nix-community", "repo": "fenix", - "rev": "3b47535a5c782e4f4ad59cd4bdb23636b6926e03", + "rev": "ff8cb1e6d1755aa3ace7c662f79f74882cc5022f", "type": "github" }, "original": { @@ -51,32 +51,10 @@ "type": "github" } }, - "git-hooks": { - "inputs": { - "flake-compat": "flake-compat", - "gitignore": "gitignore", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1733665616, - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "d8c02f0ffef0ef39f6063731fc539d8c71eb463a", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ - "git-hooks", + "pre-commit-hooks", "nixpkgs" ] }, @@ -95,10 +73,10 @@ }, "nixpkgs": { "locked": { - "lastModified": 1728279793, + "lastModified": 1736320768, "owner": "NixOS", "repo": "nixpkgs", - "rev": "f85a2d005e83542784a755ca8da112f4f65c4aa4", + "rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", "type": "github" }, "original": { @@ -123,18 +101,24 @@ "type": "github" } }, - "nixpkgs-stable": { + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ] + }, "locked": { - "lastModified": 1733730953, - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "7109b680d161993918b0a126f38bc39763e5a709", + "lastModified": 1735882644, + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "a5a961387e75ae44cc20f0a57ae463da5e959656", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", "type": "github" } }, @@ -142,21 +126,18 @@ "inputs": { "devenv": "devenv", "fenix": "fenix", - "git-hooks": "git-hooks", "nixpkgs": "nixpkgs", "nixpkgs-2305": "nixpkgs-2305", - "pre-commit-hooks": [ - "git-hooks" - ] + "pre-commit-hooks": "pre-commit-hooks" } }, "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1728386838, + "lastModified": 1736424758, "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "efaf8bd5de34e2f47bd57425b83e0c7974902176", + "rev": "cc016df54b03d8c1bbb1aae761da01dbfae5f126", "type": "github" }, "original": { diff --git a/tket2/src/circuit/command.rs b/tket2/src/circuit/command.rs index 53f85e6e..4003557a 100644 --- a/tket2/src/circuit/command.rs +++ b/tket2/src/circuit/command.rs @@ -153,7 +153,7 @@ impl<'circ, T: HugrView> Command<'circ, T> { pub fn is_linear_port(&self, port: Port) -> bool { self.optype() .port_kind(port) - .map_or(false, |kind| kind.is_linear()) + .is_some_and(|kind| kind.is_linear()) } /// Returns a metadata value associated with the command's node. diff --git a/tket2/src/serialize/pytket/param/encode.rs b/tket2/src/serialize/pytket/param/encode.rs index 962dcfbc..76c30e09 100644 --- a/tket2/src/serialize/pytket/param/encode.rs +++ b/tket2/src/serialize/pytket/param/encode.rs @@ -18,10 +18,7 @@ pub fn fold_param_op(optype: &OpType, inputs: &[&str]) -> Option { let param = match optype { OpType::Const(const_op) => { // New constant, register it if it can be interpreted as a parameter. - match try_constant_to_param(const_op.value()) { - Some(param) => param, - None => return None, - } + try_constant_to_param(const_op.value())? } OpType::LoadConstant(_op_type) => { // Re-use the parameter from the input. diff --git a/uv.lock b/uv.lock index 8c2b94fb..7b6d1401 100644 --- a/uv.lock +++ b/uv.lock @@ -7,7 +7,9 @@ members = [ "tket2-eccs", "tket2-exts", ] -requirements = [ + +[manifest.dependency-groups] +dev = [ { name = "graphviz", specifier = ">=0.20,<0.21" }, { name = "hypothesis", specifier = ">=6.111.1,<7" }, { name = "maturin", specifier = ">=1.7.0,<2" },