@@ -119,7 +119,7 @@ impl File {
119
119
pub fn path ( & self , name : & BStr ) -> Result < Cow < ' _ , BStr > , config:: path:: Error > {
120
120
let path_bstr =
121
121
self . config
122
- . string ( & format ! ( "submodule.{name}.path" ) )
122
+ . string ( format ! ( "submodule.{name}.path" ) )
123
123
. ok_or_else ( || config:: path:: Error :: Missing {
124
124
submodule : name. to_owned ( ) ,
125
125
} ) ?;
@@ -148,7 +148,7 @@ impl File {
148
148
pub fn url ( & self , name : & BStr ) -> Result < gix_url:: Url , config:: url:: Error > {
149
149
let url = self
150
150
. config
151
- . string ( & format ! ( "submodule.{name}.url" ) )
151
+ . string ( format ! ( "submodule.{name}.url" ) )
152
152
. ok_or_else ( || config:: url:: Error :: Missing {
153
153
submodule : name. to_owned ( ) ,
154
154
} ) ?;
@@ -166,7 +166,7 @@ impl File {
166
166
167
167
/// Retrieve the `update` field of the submodule named `name`, if present.
168
168
pub fn update ( & self , name : & BStr ) -> Result < Option < Update > , config:: update:: Error > {
169
- let value: Update = match self . config . string ( & format ! ( "submodule.{name}.update" ) ) {
169
+ let value: Update = match self . config . string ( format ! ( "submodule.{name}.update" ) ) {
170
170
Some ( v) => v. as_ref ( ) . try_into ( ) . map_err ( |( ) | config:: update:: Error :: Invalid {
171
171
submodule : name. to_owned ( ) ,
172
172
actual : v. into_owned ( ) ,
@@ -196,7 +196,7 @@ impl File {
196
196
///
197
197
/// Note that `Default` is implemented for [`Branch`].
198
198
pub fn branch ( & self , name : & BStr ) -> Result < Option < Branch > , config:: branch:: Error > {
199
- let branch = match self . config . string ( & format ! ( "submodule.{name}.branch" ) ) {
199
+ let branch = match self . config . string ( format ! ( "submodule.{name}.branch" ) ) {
200
200
Some ( v) => v,
201
201
None => return Ok ( None ) ,
202
202
} ;
@@ -215,7 +215,7 @@ impl File {
215
215
/// Note that if it's unset, it should be retrieved from `fetch.recurseSubmodules` in the configuration.
216
216
pub fn fetch_recurse ( & self , name : & BStr ) -> Result < Option < FetchRecurse > , config:: Error > {
217
217
self . config
218
- . boolean ( & format ! ( "submodule.{name}.fetchRecurseSubmodules" ) )
218
+ . boolean ( format ! ( "submodule.{name}.fetchRecurseSubmodules" ) )
219
219
. map ( FetchRecurse :: new)
220
220
. transpose ( )
221
221
. map_err ( |value| config:: Error {
@@ -228,7 +228,7 @@ impl File {
228
228
/// Retrieve the `ignore` field of the submodule named `name`, or `None` if unset.
229
229
pub fn ignore ( & self , name : & BStr ) -> Result < Option < Ignore > , config:: Error > {
230
230
self . config
231
- . string ( & format ! ( "submodule.{name}.ignore" ) )
231
+ . string ( format ! ( "submodule.{name}.ignore" ) )
232
232
. map ( |value| {
233
233
Ignore :: try_from ( value. as_ref ( ) ) . map_err ( |( ) | config:: Error {
234
234
field : "ignore" ,
@@ -243,6 +243,6 @@ impl File {
243
243
///
244
244
/// If `true`, the submodule will be checked out with `depth = 1`. If unset, `false` is assumed.
245
245
pub fn shallow ( & self , name : & BStr ) -> Result < Option < bool > , gix_config:: value:: Error > {
246
- self . config . boolean ( & format ! ( "submodule.{name}.shallow" ) ) . transpose ( )
246
+ self . config . boolean ( format ! ( "submodule.{name}.shallow" ) ) . transpose ( )
247
247
}
248
248
}
0 commit comments