Skip to content

Commit 56e5ae3

Browse files
clippy fmt
1 parent b0759f6 commit 56e5ae3

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

crates/djls-project/src/python.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,9 @@ mod tests {
276276

277277
mod env_discovery {
278278
use system::mock::MockGuard;
279-
use system::mock::{self as sys_mock};
279+
use system::mock::{
280+
self as sys_mock,
281+
};
280282
use which::Error as WhichError;
281283

282284
use super::*;
@@ -289,7 +291,7 @@ mod tests {
289291

290292
let env = PythonEnvironment::new(
291293
Utf8Path::from_path(project_dir.path()).unwrap(),
292-
Some(&venv_prefix.to_string()),
294+
Some(venv_prefix.as_ref()),
293295
)
294296
.expect("Should find environment with explicit path");
295297

@@ -331,7 +333,7 @@ mod tests {
331333
.expect("Invalid UTF-8 path");
332334
let env = PythonEnvironment::new(
333335
Utf8Path::from_path(project_dir.path()).unwrap(),
334-
Some(&invalid_path.to_string()),
336+
Some(invalid_path.as_ref()),
335337
)
336338
.expect("Should fall through to project .venv");
337339

@@ -378,7 +380,7 @@ mod tests {
378380
// Call with explicit path to venv2
379381
let env = PythonEnvironment::new(
380382
Utf8Path::from_path(project_dir.path()).unwrap(),
381-
Some(&venv2_prefix.to_string()),
383+
Some(venv2_prefix.as_ref()),
382384
)
383385
.expect("Should find environment via explicit path");
384386

crates/djls-project/src/system.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ mod tests {
103103
use std::env::VarError;
104104

105105
use super::mock::MockGuard;
106-
use super::mock::{self as sys_mock};
106+
use super::mock::{
107+
self as sys_mock,
108+
};
107109
use super::*;
108110

109111
#[test]

crates/djls-templates/src/lexer.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,10 @@ impl<'db> Lexer<'db> {
205205

206206
#[cfg(test)]
207207
mod tests {
208+
use camino::Utf8Path;
209+
208210
use super::*;
209211
use crate::tokens::TokenSnapshotVec;
210-
use camino::Utf8Path;
211212

212213
#[salsa::db]
213214
#[derive(Clone)]

crates/djls-workspace/src/fs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
use std::io;
77
use std::sync::Arc;
88

9-
use camino::{Utf8Path, Utf8PathBuf};
9+
use camino::Utf8Path;
10+
use camino::Utf8PathBuf;
1011
use rustc_hash::FxHashMap;
1112

1213
use crate::buffers::Buffers;

0 commit comments

Comments
 (0)