File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -189,15 +189,15 @@ fn sanitize_name(name: &str) -> String {
189
189
}
190
190
191
191
#[ derive( Debug ) ]
192
- struct ScriptSource < ' s > {
192
+ pub struct ScriptSource < ' s > {
193
193
shebang : Option < & ' s str > ,
194
194
info : Option < & ' s str > ,
195
195
frontmatter : Option < & ' s str > ,
196
196
content : & ' s str ,
197
197
}
198
198
199
199
impl < ' s > ScriptSource < ' s > {
200
- fn parse ( input : & ' s str ) -> CargoResult < Self > {
200
+ pub fn parse ( input : & ' s str ) -> CargoResult < Self > {
201
201
let mut source = Self {
202
202
shebang : None ,
203
203
info : None ,
@@ -280,19 +280,19 @@ impl<'s> ScriptSource<'s> {
280
280
Ok ( source)
281
281
}
282
282
283
- fn shebang ( & self ) -> Option < & ' s str > {
283
+ pub fn shebang ( & self ) -> Option < & ' s str > {
284
284
self . shebang
285
285
}
286
286
287
- fn info ( & self ) -> Option < & ' s str > {
287
+ pub fn info ( & self ) -> Option < & ' s str > {
288
288
self . info
289
289
}
290
290
291
- fn frontmatter ( & self ) -> Option < & ' s str > {
291
+ pub fn frontmatter ( & self ) -> Option < & ' s str > {
292
292
self . frontmatter
293
293
}
294
294
295
- fn content ( & self ) -> & ' s str {
295
+ pub fn content ( & self ) -> & ' s str {
296
296
self . content
297
297
}
298
298
}
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ mod targets;
39
39
40
40
use self :: targets:: to_targets;
41
41
42
+ pub use embedded:: ScriptSource ;
43
+
42
44
/// See also `bin/cargo/commands/run.rs`s `is_manifest_command`
43
45
pub fn is_embedded ( path : & Path ) -> bool {
44
46
let ext = path. extension ( ) ;
You can’t perform that action at this time.
0 commit comments