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 {
189189}
190190
191191#[ derive( Debug ) ]
192- struct ScriptSource < ' s > {
192+ pub struct ScriptSource < ' s > {
193193 shebang : Option < & ' s str > ,
194194 info : Option < & ' s str > ,
195195 frontmatter : Option < & ' s str > ,
196196 content : & ' s str ,
197197}
198198
199199impl < ' s > ScriptSource < ' s > {
200- fn parse ( input : & ' s str ) -> CargoResult < Self > {
200+ pub fn parse ( input : & ' s str ) -> CargoResult < Self > {
201201 let mut source = Self {
202202 shebang : None ,
203203 info : None ,
@@ -280,19 +280,19 @@ impl<'s> ScriptSource<'s> {
280280 Ok ( source)
281281 }
282282
283- fn shebang ( & self ) -> Option < & ' s str > {
283+ pub fn shebang ( & self ) -> Option < & ' s str > {
284284 self . shebang
285285 }
286286
287- fn info ( & self ) -> Option < & ' s str > {
287+ pub fn info ( & self ) -> Option < & ' s str > {
288288 self . info
289289 }
290290
291- fn frontmatter ( & self ) -> Option < & ' s str > {
291+ pub fn frontmatter ( & self ) -> Option < & ' s str > {
292292 self . frontmatter
293293 }
294294
295- fn content ( & self ) -> & ' s str {
295+ pub fn content ( & self ) -> & ' s str {
296296 self . content
297297 }
298298}
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ mod targets;
3939
4040use self :: targets:: to_targets;
4141
42+ pub use embedded:: ScriptSource ;
43+
4244/// See also `bin/cargo/commands/run.rs`s `is_manifest_command`
4345pub fn is_embedded ( path : & Path ) -> bool {
4446 let ext = path. extension ( ) ;
You can’t perform that action at this time.
0 commit comments