Skip to content

Commit 16bd0dc

Browse files
authored
Move is_absolute_path function location
1 parent ff2eff3 commit 16bd0dc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/cred.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,6 @@ impl CredentialHelper {
306306
}
307307
}
308308

309-
fn is_absolute_path(path: &str) -> bool {
310-
path.starts_with('/')
311-
|| path.starts_with('\\')
312-
|| cfg!(windows) && path.chars().nth(1).is_some_and(|x| x == ':')
313-
}
314-
315309
fn exact_key(&self, name: &str) -> String {
316310
format!("credential.{}.{}", self.url, name)
317311
}
@@ -487,6 +481,12 @@ impl CredentialHelper {
487481
}
488482
}
489483

484+
fn is_absolute_path(path: &str) -> bool {
485+
path.starts_with('/')
486+
|| path.starts_with('\\')
487+
|| cfg!(windows) && path.chars().nth(1).is_some_and(|x| x == ':')
488+
}
489+
490490
#[cfg(test)]
491491
mod test {
492492
use std::env;

0 commit comments

Comments
 (0)