File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ jobs:
134
134
- uses : actions-rs/cargo@v1
135
135
with :
136
136
command : clippy
137
- args : --workspace --locked -- -D warnings
137
+ args : --all-targets -- workspace --locked -- -D warnings
138
138
139
139
- name : Clean unused artifacts
140
140
uses : actions-rs/cargo@v1
Original file line number Diff line number Diff line change @@ -230,8 +230,8 @@ impl<'a> FakeRelease<'a> {
230
230
// Upload all source files as rustdoc files
231
231
// In real life, these would be highlighted HTML, but for testing we just use the files themselves.
232
232
for ( source_path, data) in & self . source_files {
233
- if source_path. starts_with ( "src/" ) {
234
- let updated = [ "src" , & package. name , & source_path [ 4 .. ] ] . join ( "/" ) ;
233
+ if let Some ( src ) = source_path. strip_prefix ( "src/" ) {
234
+ let updated = [ "src" , & package. name , src ] . join ( "/" ) ;
235
235
rustdoc_files. push ( ( Box :: leak ( Box :: new ( updated) ) , data) ) ;
236
236
}
237
237
}
Original file line number Diff line number Diff line change @@ -715,11 +715,11 @@ mod test {
715
715
assert_redirect ( & format ! ( "/{}" , krate) , & target, web) ?;
716
716
assert_redirect ( & format ! ( "/{}/" , krate) , & target, web) ?;
717
717
}
718
- let target = format ! ( "https://doc.rust-lang.org/stable/proc_macro/" ) ;
719
718
719
+ let target = "https://doc.rust-lang.org/stable/proc_macro/" ;
720
720
// with or without slash
721
- assert_redirect ( "/proc-macro" , & target, web) ?;
722
- assert_redirect ( "/proc-macro/" , & target, web) ?;
721
+ assert_redirect ( "/proc-macro" , target, web) ?;
722
+ assert_redirect ( "/proc-macro/" , target, web) ?;
723
723
Ok ( ( ) )
724
724
} )
725
725
}
You can’t perform that action at this time.
0 commit comments