@@ -22,13 +22,13 @@ impl<'repo> Snapshot<'repo> {
2222 /// For a non-degenerating version, use [`try_boolean(…)`][Self::try_boolean()].
2323 ///
2424 /// Note that this method takes the most recent value at `key` even if it is from a file with reduced trust.
25- pub fn boolean < ' a > ( & self , key : impl Into < & ' a BStr > ) -> Option < bool > {
25+ pub fn boolean ( & self , key : impl gix_config :: AsKey ) -> Option < bool > {
2626 self . try_boolean ( key) . and_then ( Result :: ok)
2727 }
2828
2929 /// Like [`boolean()`][Self::boolean()], but it will report an error if the value couldn't be interpreted as boolean.
30- pub fn try_boolean < ' a > ( & self , key : impl Into < & ' a BStr > ) -> Option < Result < bool , gix_config:: value:: Error > > {
31- self . repo . config . resolved . boolean ( key. into ( ) )
30+ pub fn try_boolean ( & self , key : impl gix_config :: AsKey ) -> Option < Result < bool , gix_config:: value:: Error > > {
31+ self . repo . config . resolved . boolean ( key)
3232 }
3333
3434 /// Return the resolved integer at `key`, or `None` if there is no such value or if the value can't be interpreted as
@@ -37,40 +37,40 @@ impl<'repo> Snapshot<'repo> {
3737 /// For a non-degenerating version, use [`try_integer(…)`][Self::try_integer()].
3838 ///
3939 /// Note that this method takes the most recent value at `key` even if it is from a file with reduced trust.
40- pub fn integer < ' a > ( & self , key : impl Into < & ' a BStr > ) -> Option < i64 > {
40+ pub fn integer ( & self , key : impl gix_config :: AsKey ) -> Option < i64 > {
4141 self . try_integer ( key) . and_then ( Result :: ok)
4242 }
4343
4444 /// Like [`integer()`][Self::integer()], but it will report an error if the value couldn't be interpreted as boolean.
45- pub fn try_integer < ' a > ( & self , key : impl Into < & ' a BStr > ) -> Option < Result < i64 , gix_config:: value:: Error > > {
46- self . repo . config . resolved . integer ( key. into ( ) )
45+ pub fn try_integer ( & self , key : impl gix_config :: AsKey ) -> Option < Result < i64 , gix_config:: value:: Error > > {
46+ self . repo . config . resolved . integer ( key)
4747 }
4848
4949 /// Return the string at `key`, or `None` if there is no such value.
5050 ///
5151 /// Note that this method takes the most recent value at `key` even if it is from a file with reduced trust.
52- pub fn string < ' a > ( & self , key : impl Into < & ' a BStr > ) -> Option < Cow < ' repo , BStr > > {
53- self . repo . config . resolved . string ( key. into ( ) )
52+ pub fn string ( & self , key : impl gix_config :: AsKey ) -> Option < Cow < ' repo , BStr > > {
53+ self . repo . config . resolved . string ( key)
5454 }
5555
5656 /// Return the trusted and fully interpolated path at `key`, or `None` if there is no such value
5757 /// or if no value was found in a trusted file.
5858 /// An error occurs if the path could not be interpolated to its final value.
59- pub fn trusted_path < ' a > (
59+ pub fn trusted_path (
6060 & self ,
61- key : impl Into < & ' a BStr > ,
61+ key : impl gix_config :: AsKey ,
6262 ) -> Option < Result < Cow < ' repo , std:: path:: Path > , gix_config:: path:: interpolate:: Error > > {
63- self . repo . config . trusted_file_path ( key. into ( ) )
63+ self . repo . config . trusted_file_path ( key)
6464 }
6565
6666 /// Return the trusted string at `key` for launching using [command::prepare()](gix_command::prepare()),
6767 /// or `None` if there is no such value or if no value was found in a trusted file.
68- pub fn trusted_program < ' a > ( & self , key : impl Into < & ' a BStr > ) -> Option < Cow < ' repo , OsStr > > {
68+ pub fn trusted_program ( & self , key : impl gix_config :: AsKey ) -> Option < Cow < ' repo , OsStr > > {
6969 let value = self
7070 . repo
7171 . config
7272 . resolved
73- . string_filter ( key. into ( ) , & mut self . repo . config . filter_config_section . clone ( ) ) ?;
73+ . string_filter ( key, & mut self . repo . config . filter_config_section . clone ( ) ) ?;
7474 Some ( match gix_path:: from_bstr ( value) {
7575 Cow :: Borrowed ( v) => Cow :: Borrowed ( v. as_os_str ( ) ) ,
7676 Cow :: Owned ( v) => Cow :: Owned ( v. into_os_string ( ) ) ,
0 commit comments