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 {
105105impl TomlLockfileSourceId {
106106 pub fn new ( source : String ) -> Result < Self , TomlLockfileSourceIdError > {
107107 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 ( ) ) ) ?;
113111
114112 // Sparse URLs store the kind prefix (sparse+) in the URL. Therefore, for sparse kinds, we
115113 // want to use the raw `source` instead of the splitted `url`.
You can’t perform that action at this time.
0 commit comments