Skip to content

Commit 30c86ab

Browse files
committed
Changed: Use core::mem::take instead of std::mem::take
Follow project convention of preferring core:: over std:: where possible.
1 parent d8943bb commit 30c86ab

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/llm-coding-tools-bubblewrap/src/probe.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use crate::path_util::normalize_path;
66
use crate::{Availability, LinuxBwrapError, Preset};
77
use parking_lot::RwLock;
8+
use std::collections::HashSet;
89
use std::env;
910
use std::ffi::{OsStr, OsString};
1011
use std::path::{Path, PathBuf};
@@ -124,7 +125,7 @@ fn first_shell_candidate_with_in<F, R>(
124125
where
125126
F: FnMut(&Path) -> Option<R>,
126127
{
127-
let mut seen = std::collections::HashSet::with_capacity(10);
128+
let mut seen = HashSet::with_capacity(10);
128129

129130
for name in ["bash", "sh"] {
130131
if let Some(shell_path) = find_binary_on_path_in(name, env_path) {
@@ -150,7 +151,7 @@ where
150151

151152
fn classify_shell_candidate<F, R>(
152153
classify: &mut F,
153-
seen: &mut std::collections::HashSet<Box<Path>>,
154+
seen: &mut HashSet<Box<Path>>,
154155
path: Box<Path>,
155156
) -> Option<(Box<Path>, R)>
156157
where

src/llm-coding-tools-core/src/tools/bash/tokio_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ where
5656
fn take_pipe_buffer(buffer: SharedPipeBuffer) -> Vec<u8> {
5757
match Arc::try_unwrap(buffer) {
5858
Ok(mutex) => mutex.into_inner(),
59-
Err(shared) => std::mem::take(&mut *shared.lock()),
59+
Err(shared) => core::mem::take(&mut *shared.lock()),
6060
}
6161
}
6262

0 commit comments

Comments
 (0)