Skip to content

Commit

Permalink
feat(config): update ObjectDir new method
Browse files Browse the repository at this point in the history
  • Loading branch information
tu6ge committed Feb 15, 2023
1 parent 84a89cd commit 2d8f842
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ impl<'a> ObjectDir<'a> {
/// assert!(ObjectDir::new("../abc/").is_err());
/// assert!(ObjectDir::new(r"aaa\abc/").is_err());
/// ```
pub fn new(val: impl Into<Cow<'a, str>>) -> Result<Self, InvalidObjectDir> {
pub fn new<'b: 'a>(val: impl Into<Cow<'b, str>>) -> Result<Self, InvalidObjectDir> {
let val = val.into();
if val.starts_with('/') || val.starts_with('.') || !val.ends_with('/') {
return Err(InvalidObjectDir);
Expand Down

0 comments on commit 2d8f842

Please sign in to comment.