MCPcopy Index your code
hub / github.com/RustPython/RustPython / argv

Function argv

src/settings.rs:114–118  ·  view source on GitHub ↗
(argv0: String, mut parser: lexopt::Parser)

Source from the content-addressed store, hash-verified

112 let mut args = CliArgs::default();
113 let mut parser = lexopt::Parser::from_env();
114 fn argv(argv0: String, mut parser: lexopt::Parser) -> Result<Vec<String>, lexopt::Error> {
115 std::iter::once(Ok(argv0))
116 .chain(parser.raw_args()?.map(|arg| arg.string()))
117 .collect()
118 }
119 while let Some(arg) = parser.next()? {
120 match arg {
121 Short('b') => args.bytes_warning += 1,

Callers 1

parse_argsFunction · 0.70

Calls 5

onceFunction · 0.85
collectMethod · 0.80
chainMethod · 0.80
mapMethod · 0.45
stringMethod · 0.45

Tested by

no test coverage detected