This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs-object-store.git


The following commit(s) were added to refs/heads/main by this push:
     new e64e8e3  Pin Rust toolchain to 1.97.0 and fix clippy 
useless_borrows_in_formatting (#799)
e64e8e3 is described below

commit e64e8e349e111b1a39e60a27ac83bb59f4f1b45b
Author: Andrew Lamb <[email protected]>
AuthorDate: Fri Jul 10 08:53:08 2026 -0400

    Pin Rust toolchain to 1.97.0 and fix clippy useless_borrows_in_formatting 
(#799)
    
    Adds a rust-toolchain.toml (mirroring apache/arrow-rs) pinning the
    toolchain to 1.97.0 so CI uses a stable, reproducible Rust version and
    is not surprised by new lints in future releases.
    
    Rust 1.97.0's clippy added the useless_borrows_in_formatting lint, which
    flags redundant references in format! arguments. Fixes the resulting
    failures in the azure module.
    
    Closes #798
    
    Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
---
 rust-toolchain.toml     | 20 ++++++++++++++++
 src/azure/builder.rs    |  4 ++--
 src/azure/credential.rs | 64 ++++++++++++++++++++++++-------------------------
 3 files changed, 54 insertions(+), 34 deletions(-)

diff --git a/rust-toolchain.toml b/rust-toolchain.toml
new file mode 100644
index 0000000..b304c39
--- /dev/null
+++ b/rust-toolchain.toml
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[toolchain]
+channel = "1.97.0"
+components = ["rustfmt", "clippy"]
diff --git a/src/azure/builder.rs b/src/azure/builder.rs
index 852f970..d1d68fe 100644
--- a/src/azure/builder.rs
+++ b/src/azure/builder.rs
@@ -1266,9 +1266,9 @@ impl MicrosoftAzureBuilder {
                 Some(account_url) => account_url,
                 None => match self.use_fabric_endpoint.get()? {
                     true => {
-                        format!("https://{}.blob.fabric.microsoft.com";, 
&account_name)
+                        format!("https://{}.blob.fabric.microsoft.com";, 
account_name)
                     }
-                    false => format!("https://{}.blob.core.windows.net";, 
&account_name),
+                    false => format!("https://{}.blob.core.windows.net";, 
account_name),
                 },
             };
 
diff --git a/src/azure/credential.rs b/src/azure/credential.rs
index f4c2989..5537e34 100644
--- a/src/azure/credential.rs
+++ b/src/azure/credential.rs
@@ -441,18 +441,18 @@ fn string_to_sign_service_sas(
         signed_start,
         signed_expiry,
         canonicalized_resource,
-        "",                               // signed identifier
-        "",                               // signed ip
-        "",                               // signed protocol
-        &AZURE_VERSION.to_str().unwrap(), // signed version
-        signed_resource,                  // signed resource
-        "",                               // signed snapshot time
-        "",                               // signed encryption scope
-        "",                               // rscc - response header: 
Cache-Control
-        "",                               // rscd - response header: 
Content-Disposition
-        "",                               // rsce - response header: 
Content-Encoding
-        "",                               // rscl - response header: 
Content-Language
-        "",                               // rsct - response header: 
Content-Type
+        "",                              // signed identifier
+        "",                              // signed ip
+        "",                              // signed protocol
+        AZURE_VERSION.to_str().unwrap(), // signed version
+        signed_resource,                 // signed resource
+        "",                              // signed snapshot time
+        "",                              // signed encryption scope
+        "",                              // rscc - response header: 
Cache-Control
+        "",                              // rscd - response header: 
Content-Disposition
+        "",                              // rsce - response header: 
Content-Encoding
+        "",                              // rscl - response header: 
Content-Language
+        "",                              // rsct - response header: 
Content-Type
     );
 
     let mut pairs = HashMap::new();
@@ -485,26 +485,26 @@ fn string_to_sign_user_delegation_sas(
         signed_start,
         signed_expiry,
         canonicalized_resource,
-        delegation_key.signed_oid,        // signed key object id
-        delegation_key.signed_tid,        // signed key tenant id
-        delegation_key.signed_start,      // signed key start
-        delegation_key.signed_expiry,     // signed key expiry
-        delegation_key.signed_service,    // signed key service
-        delegation_key.signed_version,    // signed key version
-        "",                               // signed authorized user object id
-        "",                               // signed unauthorized user object id
-        "",                               // signed correlation id
-        "",                               // signed ip
-        "",                               // signed protocol
-        &AZURE_VERSION.to_str().unwrap(), // signed version
-        signed_resource,                  // signed resource
-        "",                               // signed snapshot time
-        "",                               // signed encryption scope
-        "",                               // rscc - response header: 
Cache-Control
-        "",                               // rscd - response header: 
Content-Disposition
-        "",                               // rsce - response header: 
Content-Encoding
-        "",                               // rscl - response header: 
Content-Language
-        "",                               // rsct - response header: 
Content-Type
+        delegation_key.signed_oid,       // signed key object id
+        delegation_key.signed_tid,       // signed key tenant id
+        delegation_key.signed_start,     // signed key start
+        delegation_key.signed_expiry,    // signed key expiry
+        delegation_key.signed_service,   // signed key service
+        delegation_key.signed_version,   // signed key version
+        "",                              // signed authorized user object id
+        "",                              // signed unauthorized user object id
+        "",                              // signed correlation id
+        "",                              // signed ip
+        "",                              // signed protocol
+        AZURE_VERSION.to_str().unwrap(), // signed version
+        signed_resource,                 // signed resource
+        "",                              // signed snapshot time
+        "",                              // signed encryption scope
+        "",                              // rscc - response header: 
Cache-Control
+        "",                              // rscd - response header: 
Content-Disposition
+        "",                              // rsce - response header: 
Content-Encoding
+        "",                              // rscl - response header: 
Content-Language
+        "",                              // rsct - response header: 
Content-Type
     );
 
     let mut pairs = HashMap::new();

Reply via email to