File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
crates/cargo-util-schemas/src Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -105,11 +105,9 @@ pub struct TomlLockfileSourceId {
105
105
impl TomlLockfileSourceId {
106
106
pub fn new ( source : String ) -> Result < Self , TomlLockfileSourceIdError > {
107
107
let source_str = source. clone ( ) ;
108
- let ( kind, url) = source. split_once ( '+' ) . ok_or_else ( || {
109
- TomlLockfileSourceIdError (
110
- TomlLockfileSourceIdErrorKind :: InvalidSource ( source. clone ( ) ) . into ( ) ,
111
- )
112
- } ) ?;
108
+ let ( kind, url) = source
109
+ . split_once ( '+' )
110
+ . ok_or_else ( || TomlLockfileSourceIdErrorKind :: InvalidSource ( source. clone ( ) ) ) ?;
113
111
114
112
// Sparse URLs store the kind prefix (sparse+) in the URL. Therefore, for sparse kinds, we
115
113
// want to use the raw `source` instead of the splitted `url`.
You can’t perform that action at this time.
0 commit comments