Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.

Commit e5d3225

Browse files
Fix lint errors from Rust 1.85 (#1459)
1 parent 4ee53b5 commit e5d3225

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

rye/src/cli/init.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,7 @@ pub fn execute(cmd: Args) -> Result<(), Error> {
318318
// underscores instead of dashes to form a valid python package name and in
319319
// case it starts with a digit, an underscore is prepended.
320320
let mut name_safe = metadata.name.as_ref().unwrap().replace('-', "_");
321-
if name_safe
322-
.chars()
323-
.next()
324-
.map_or(true, |c| c.is_ascii_digit())
325-
{
321+
if name_safe.chars().next().is_none_or(|c| c.is_ascii_digit()) {
326322
name_safe.insert(0, '_');
327323
}
328324

rye/src/installer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ fn install_scripts(
265265
//
266266
// Also do not try to link things which are not considered executables on
267267
// this operating system.
268-
if !rest.parent().map_or(true, |x| x == Path::new("")) || !is_executable(file) {
268+
if rest.parent().is_some_and(|x| x != Path::new("")) || !is_executable(file) {
269269
continue;
270270
}
271271

rye/src/pyproject.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ fn resolve_target_python_version(
12051205
) -> Option<PythonVersionRequest> {
12061206
resolve_lower_bound_python_version(doc)
12071207
.or_else(|| get_current_venv_python_version(venv_path).map(Into::into))
1208-
.or_else(|| get_python_version_request_from_pyenv_pin(root).map(Into::into))
1208+
.or_else(|| get_python_version_request_from_pyenv_pin(root))
12091209
.or_else(|| Config::current().default_toolchain().ok())
12101210
}
12111211

0 commit comments

Comments
 (0)