File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
crates/cargo-util-schemas/src/manifest Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -254,12 +254,12 @@ impl TomlPackage {
254
254
self . authors . as_ref ( ) . map ( |v| v. normalized ( ) ) . transpose ( )
255
255
}
256
256
257
- pub fn normalized_build ( & self ) -> Result < Option < & String > , UnresolvedError > {
257
+ pub fn normalized_build ( & self ) -> Result < Option < & [ String ] > , UnresolvedError > {
258
258
let build = self . build . as_ref ( ) . ok_or ( UnresolvedError ) ?;
259
259
match build {
260
260
TomlPackageBuild :: Auto ( false ) => Ok ( None ) ,
261
261
TomlPackageBuild :: Auto ( true ) => Err ( UnresolvedError ) ,
262
- TomlPackageBuild :: SingleScript ( value) => Ok ( Some ( value) ) ,
262
+ TomlPackageBuild :: SingleScript ( value) => Ok ( Some ( std :: slice :: from_ref ( value) ) ) ,
263
263
}
264
264
}
265
265
Original file line number Diff line number Diff line change @@ -105,7 +105,8 @@ pub(super) fn to_targets(
105
105
if metabuild. is_some ( ) {
106
106
anyhow:: bail!( "cannot specify both `metabuild` and `build`" ) ;
107
107
}
108
- let custom_build = Path :: new ( custom_build) ;
108
+ assert_eq ! ( custom_build. len( ) , 1 ) ;
109
+ let custom_build = Path :: new ( & custom_build[ 0 ] ) ;
109
110
let name = format ! (
110
111
"build-script-{}" ,
111
112
custom_build
You can’t perform that action at this time.
0 commit comments