MCPcopy Create free account
hub / github.com/csskit/csskit / sources

Method sources

crates/csskit/src/input.rs:55–70  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

53
54impl InputArgs {
55 pub fn sources(&self) -> Result<Vec<(&str, InputSource<'_>)>> {
56 if let Some(content) = &self.content {
57 Ok(vec![("<content>", InputSource::Content(Cursor::new(content)))])
58 } else {
59 let mut sources = Vec::new();
60 for file in &self.files {
61 let source = if file == "-" {
62 InputSource::Stdin(stdin().lock())
63 } else {
64 InputSource::File(BufReader::new(File::open(file)?))
65 };
66 sources.push((file.as_str(), source));
67 }
68 Ok(sources)
69 }
70 }
71}

Callers 9

runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
output_countMethod · 0.80

Calls 2

FileClass · 0.85
as_strMethod · 0.45

Tested by

no test coverage detected