Skip to content

Commit b87054e

Browse files
authored
chore: Support Clippy 1.88 (#497)
* chore: Support Clippy 1.88 * More lint fixes
1 parent 2f8d01b commit b87054e

File tree

14 files changed

+16
-22
lines changed

14 files changed

+16
-22
lines changed

obstore/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn main() {
88
let lockfile_location = get_lockfile_location().unwrap();
99
let (version, source) = read_lockfile(&lockfile_location);
1010

11-
println!("cargo:rustc-env=OBJECT_STORE_VERSION={}", version);
11+
println!("cargo:rustc-env=OBJECT_STORE_VERSION={version}");
1212
println!(
1313
"cargo:rustc-env=OBJECT_STORE_SOURCE={}",
1414
source.map(|s| s.to_string()).unwrap_or("".to_string())

obstore/src/attributes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn attribute_to_string(attribute: &Attribute) -> Cow<'static, str> {
3232
Attribute::ContentType => Cow::Borrowed("Content-Type"),
3333
Attribute::CacheControl => Cow::Borrowed("Cache-Control"),
3434
Attribute::Metadata(x) => x.clone(),
35-
other => panic!("Unexpected attribute: {:?}", other),
35+
other => panic!("Unexpected attribute: {other:?}"),
3636
}
3737
}
3838

obstore/src/buffered.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ impl PyReadableFile {
152152
2 => SeekFrom::End(offset as _),
153153
other => {
154154
return Err(PyIOError::new_err(format!(
155-
"Invalid value for whence in seek: {}",
156-
other
155+
"Invalid value for whence in seek: {other}"
157156
)))
158157
}
159158
};

obstore/src/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ pub(crate) fn list(
415415
"\nInstall with `pip install arro3-core`."
416416
);
417417
py.import(intern!(py, "arro3.core"))
418-
.map_err(|err| PyImportError::new_err(format!("{}\n\n{}", msg, err)))?;
418+
.map_err(|err| PyImportError::new_err(format!("{msg}\n\n{err}")))?;
419419
}
420420

421421
let store = store.into_inner().clone();

obstore/src/put.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ impl<'py> FromPyObject<'py> for PyPutMode {
3434
"create" => Ok(Self(PutMode::Create)),
3535
"overwrite" => Ok(Self(PutMode::Overwrite)),
3636
_ => Err(PyValueError::new_err(format!(
37-
"Unexpected input for PutMode: {}",
38-
s
37+
"Unexpected input for PutMode: {s}"
3938
))),
4039
}
4140
} else {

obstore/src/signer.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ impl<'py> FromPyObject<'py> for PyMethod {
129129
"CONNECT" => Method::CONNECT,
130130
other => {
131131
return Err(PyValueError::new_err(format!(
132-
"Unsupported HTTP method {}",
133-
other
132+
"Unsupported HTTP method {other}"
134133
)))
135134
}
136135
};

pyo3-object_store/src/api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn register_store_module(
4444
parent_module_str: &str,
4545
sub_module_str: &str,
4646
) -> PyResult<()> {
47-
let full_module_string = format!("{}.{}", parent_module_str, sub_module_str);
47+
let full_module_string = format!("{parent_module_str}.{sub_module_str}");
4848

4949
let child_module = PyModule::new(parent_module.py(), sub_module_str)?;
5050

@@ -102,7 +102,7 @@ pub fn register_exceptions_module(
102102
parent_module_str: &str,
103103
sub_module_str: &str,
104104
) -> PyResult<()> {
105-
let full_module_string = format!("{}.{}", parent_module_str, sub_module_str);
105+
let full_module_string = format!("{parent_module_str}.{sub_module_str}");
106106

107107
let child_module = PyModule::new(parent_module.py(), sub_module_str)?;
108108

pyo3-object_store/src/aws/store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl PyS3Store {
192192
prefix.as_ref()
193193
)
194194
} else {
195-
format!("S3Store(bucket=\"{}\")", bucket)
195+
format!("S3Store(bucket=\"{bucket}\")")
196196
}
197197
}
198198

pyo3-object_store/src/azure/store.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,7 @@ impl PyAzureStore {
213213
)
214214
} else {
215215
format!(
216-
"AzureStore(container_name=\"{}\", account_name=\"{}\")",
217-
container_name, account_name,
216+
"AzureStore(container_name=\"{container_name}\", account_name=\"{account_name}\")"
218217
)
219218
}
220219
}

pyo3-object_store/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl<'py> FromPyObject<'py> for PyClientOptions {
6565
if &key == "default_headers" {
6666
default_headers = Some(value.extract::<PyHeaderMap>()?);
6767
} else {
68-
return Err(PyValueError::new_err(format!("Invalid key: {}.", key)));
68+
return Err(PyValueError::new_err(format!("Invalid key: {key}.")));
6969
}
7070
}
7171
}

0 commit comments

Comments
 (0)