File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ fn update_index(
68
68
Ok ( ( ) )
69
69
}
70
70
71
- fn process_book ( path : & str , books_dir : & PathBuf , shelf_url : & PathBuf ) -> Result < BookContext > {
71
+ fn process_book ( path : & str , books_dir : & PathBuf , shelf_url : & str ) -> Result < BookContext > {
72
72
let book_dir = path. try_resolve ( ) ?;
73
73
let book_dir = std:: fs:: canonicalize ( book_dir) ?;
74
74
let mut book = MDBook :: load ( book_dir) ?;
@@ -112,9 +112,8 @@ pub fn execute(_args: &ArgMatches) -> Result<()> {
112
112
} else {
113
113
"" . to_owned ( )
114
114
} ;
115
- let shelf_url = PathBuf :: from ( format ! (
116
- "{shelf_url_prefix}/{shelf_book_dir}/{shelf_build_dir}/{INDEX_HTML_FILE}"
117
- ) ) ;
115
+ let shelf_url =
116
+ format ! ( "{shelf_url_prefix}/{shelf_book_dir}/{shelf_build_dir}/{INDEX_HTML_FILE}" ) ;
118
117
119
118
let mut index_file_name = shelf_book. source_dir ( ) ;
120
119
index_file_name. push ( INDEX_MD_FILE ) ;
Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ pub struct BookConfig {
416
416
pub text_direction : Option < TextDirection > ,
417
417
/// Indicates if the book is part of a bookshelf
418
418
/// and how to return to the index of the shelf if so
419
- pub shelf_url : Option < PathBuf > ,
419
+ pub shelf_url : Option < String > ,
420
420
}
421
421
422
422
impl Default for BookConfig {
You can’t perform that action at this time.
0 commit comments