mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-15 07:28:28 +00:00
Fix use of not-quite-stabilized API, and explain what the line did anyway
This commit is contained in:
parent
b489bb2228
commit
a78fb45497
@ -144,7 +144,9 @@ fn all_submodules() -> Result<Vec<PathBuf>> {
|
||||
let mut pb = vec![];
|
||||
for kv in out.stdout.split(|n| *n == 0).filter(|v| !v.is_empty()) {
|
||||
if let Ok(v) = std::str::from_utf8(kv) {
|
||||
if let Some((_, path)) = v.split_once('\n') {
|
||||
// `v` is formatted like "{name}\n{path}", so discard everything up
|
||||
// to (and including) the newline.
|
||||
if let Some(path) = v.find('\n').map(|p| &v[(p + 1)..]) {
|
||||
pb.push(path.into());
|
||||
} else {
|
||||
eprintln!(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user