Repository: tweag/nickel
Pull request #1010 (2022-12-18 00:09:26)

flake.lock: Update
Automated changes by the [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) GitHub Action.

```
Flake lock file updates:

• Updated input 'crane':
    'github:ipetkov/crane/63f80ee278897e72a1468090278716b5befa5128' (2022-12-09)
  → 'github:ipetkov/crane/59b31b41a589c0a65e4a1f86b0e5eac68081468b' (2022-12-13)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/2dea0f4c2d6e4603f54b2c56c22367e77869490c' (2022-12-09)
  → 'github:NixOS/nixpkgs/757b82211463dd5ba1475b6851d3731dfe14d377' (2022-12-16)
• Updated input 'pre-commit-hooks':
    'github:cachix/pre-commit-hooks.nix/1303a1a76e9eb074075bfe566518c413f6fc104e' (2022-12-07)
  → 'github:cachix/pre-commit-hooks.nix/a49fc91a606dbbb7a916c56bc09776fc67b5c121' (2022-12-16)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/d00c488cb455c21fea731167bf8c1b8da605aac3' (2022-12-10)
  → 'github:oxalica/rust-overlay/905db21103d646ddc1eb81920e05180e6e2b6734' (2022-12-17)
```

### Running GitHub Actions on this PR

GitHub Actions will not run workflows on pull requests which are opened by a GitHub Action.

To run GitHub Actions workflows on this PR, run:

```sh
git branch -D update_flake_lock_action
git fetch origin
git checkout update_flake_lock_action
git commit --amend --no-edit
git push origin update_flake_lock_action --force
```


Patch:
diff --git a/flake.lock b/flake.lock
index 060c9233..b4da2790 100644
--- a/flake.lock
+++ b/flake.lock
@@ -10,11 +10,11 @@
         "rust-overlay": "rust-overlay"
       },
       "locked": {
-        "lastModified": 1670546681,
-        "narHash": "sha256-S33bhME0zPHPEZyZPCsrdQL/4WW/A020PwN+a3z7Q+I=",
+        "lastModified": 1670900067,
+        "narHash": "sha256-VXVa+KBfukhmWizaiGiHRVX/fuk66P8dgSFfkVN4/MY=",
         "owner": "ipetkov",
         "repo": "crane",
-        "rev": "63f80ee278897e72a1468090278716b5befa5128",
+        "rev": "59b31b41a589c0a65e4a1f86b0e5eac68081468b",
         "type": "github"
       },
       "original": {
@@ -123,11 +123,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1670597555,
-        "narHash": "sha256-/k939P2S2246G6K5fyvC0U2IWvULhb4ZJg9K7ZxsX+k=",
+        "lastModified": 1671200928,
+        "narHash": "sha256-mZfzDyzojwj6I0wyooIjGIn81WtGVnx6+avU5Wv+VKU=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "2dea0f4c2d6e4603f54b2c56c22367e77869490c",
+        "rev": "757b82211463dd5ba1475b6851d3731dfe14d377",
         "type": "github"
       },
       "original": {
@@ -165,11 +165,11 @@
         "nixpkgs-stable": "nixpkgs-stable"
       },
       "locked": {
-        "lastModified": 1670413394,
-        "narHash": "sha256-M7sWqrKtOqUv9euX1t3HCxis8cPy9MNiZxQmUf0KF1o=",
+        "lastModified": 1671180323,
+        "narHash": "sha256-qAE390OdYvzSMe58HLpoMZ7llPlp+zIy84pXPnuXqCo=",
         "owner": "cachix",
         "repo": "pre-commit-hooks.nix",
-        "rev": "1303a1a76e9eb074075bfe566518c413f6fc104e",
+        "rev": "a49fc91a606dbbb7a916c56bc09776fc67b5c121",
         "type": "github"
       },
       "original": {
@@ -223,11 +223,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1670639101,
-        "narHash": "sha256-UvPSgbtaOk9WcgVqywnvQXOEEHx6OXdG+QXIwnbyvCw=",
+        "lastModified": 1671243596,
+        "narHash": "sha256-vQ1q6uwx2gKsHbQVhkq17nT8HwUmRbIG8cJVFafNb5s=",
         "owner": "oxalica",
         "repo": "rust-overlay",
-        "rev": "d00c488cb455c21fea731167bf8c1b8da605aac3",
+        "rev": "905db21103d646ddc1eb81920e05180e6e2b6734",
         "type": "github"
       },
       "original": {
diff --git a/lsp/nls/src/main.rs b/lsp/nls/src/main.rs
index 3139329e..f41493af 100644
--- a/lsp/nls/src/main.rs
+++ b/lsp/nls/src/main.rs
@@ -44,7 +44,7 @@ fn main() -> Result<()> {
 
     let capabilities = Server::capabilities();
 
-    connection.initialize(serde_json::to_value(&capabilities)?)?;
+    connection.initialize(serde_json::to_value(capabilities)?)?;
 
     let _server = Server::new(connection).run();
 
diff --git a/src/bin/nickel.rs b/src/bin/nickel.rs
index b2c3c7c5..567de76f 100644
--- a/src/bin/nickel.rs
+++ b/src/bin/nickel.rs
@@ -224,7 +224,7 @@ fn export(
     serialize::validate(format, &rt)?;
 
     if let Some(file) = output {
-        let file = fs::File::create(&file).map_err(IOError::from)?;
+        let file = fs::File::create(file).map_err(IOError::from)?;
         serialize::to_writer(file, format, &rt)?;
     } else {
         serialize::to_writer(std::io::stdout(), format, &rt)?;
diff --git a/src/label.rs b/src/label.rs
index 7e6b9d1b..3456600e 100644
--- a/src/label.rs
+++ b/src/label.rs
@@ -184,7 +184,7 @@ pub mod ty_path {
             (TypeF::Array(ty), Some(Elem::Array)) => {
                 // initial "Array "
                 let start_offset = 6;
-                let paren_offset = if ty.fmt_is_atom() { 0 } else { 1 };
+                let paren_offset = usize::from(!ty.fmt_is_atom());
 
                 let (sub_start, sub_end) = span(path_it, ty);
                 (
diff --git a/src/typecheck/mod.rs b/src/typecheck/mod.rs
index 64475fc6..1758f240 100644
--- a/src/typecheck/mod.rs
+++ b/src/typecheck/mod.rs
@@ -890,8 +890,7 @@ fn walk<L: Linearizer>(
             // equality. See the `Let` case above for more details on why such recursive bindings
             // are currently ignored.
             record.fields
-                .iter()
-                .map(|(_, t)| t)
+                .values()
                 .chain(dynamic.iter().map(|(_, t)| t))
                 .try_for_each(|t| -> Result<(), TypecheckError> {
                     walk(state, ctxt.clone(), lin, linearizer.scope(), t)


Test patch:
diff --git a/tests/integration/contracts_fail.rs b/tests/integration/contracts_fail.rs
index a5e610a1..f585a294 100644
--- a/tests/integration/contracts_fail.rs
+++ b/tests/integration/contracts_fail.rs
@@ -215,7 +215,7 @@ fn records_contracts_poly() {
     // for that reason, you can just move the examples into the array above.
     let bad_acc = "let f | forall a. { ; a} -> { ; a} = fun x => %seq% x.a x in f";
     assert_matches!(
-        eval(&format!("{} {{a=1}}", bad_acc)),
+        eval(format!("{} {{a=1}}", bad_acc)),
         Err(Error::EvalError(EvalError::FieldMissing(..)))
     );