Skip to content

Commit 825d4c5

Browse files
committed
cleanup and remove comments
1 parent 9ba312c commit 825d4c5

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

rust-pack/src/main.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ use std::process::Command;
88

99
mod remove_function;
1010

11-
//use remove_function::remove_function_body;
12-
1311
struct Mod<'a> {
1412
pub_prefix: &'a str,
1513
explicit_path: Option<&'a str>,
@@ -130,15 +128,11 @@ fn put_module_in_string(
130128
})?;
131129
let mut mod_state = ModState::default();
132130
for line in src.lines() {
133-
//println!("mod State: {:#?}", mod_state);
134131
if let Some(m) = is_external_mod(&mut mod_state, line) {
135132
if expand_cnt == 0 {
136133
continue;
137134
};
138135
let rr = 10000;
139-
// if m.name == "try_trait" || m.name == "unsize" {
140-
// continue;
141-
//}
142136
expand_cnt -= 1;
143137
println!("{} mod found: {}", ">".repeat(depth), line);
144138
output.push_line(&format!("{}mod {} {{", m.pub_prefix, m.name));
@@ -187,12 +181,13 @@ fn main() {
187181
.stdout;
188182
let sysroot = std::str::from_utf8(&rustc_result).expect("rustc output wasn't utf8");
189183
for what in &["std", "alloc", "core"] {
190-
let path_string = &format!("{}/lib/rustlib/src/rust/library/{}/src/lib.rs", sysroot.trim(), what);
184+
let path_string =
185+
&format!("{}/lib/rustlib/src/rust/library/{}/src/lib.rs", sysroot.trim(), what);
191186
let path = Path::new(&path_string);
192187
let output_path = format!("../www/fake_{}.rs", what);
193188
let mut output = String::default();
194189
put_module_in_string(&mut output, path, 0, 4000).unwrap();
195-
//output = remove_function_body(&output);
190+
//FIXME: add it when ready: output = remove_function_body(&output);
196191
fs::write(output_path, output.clone()).unwrap();
197192
}
198193
}

rust-pack/src/remove_function.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
fn pick_char(input: &mut &str) -> char {
32
let mut iter = input.chars();
43
let r = iter.next().unwrap();

0 commit comments

Comments
 (0)