| 1 | fn mainrust-analyzer cargo edit 0.1.5 main().() { |
| 2 | let string = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!( |
| 3 | "Hello world!\nYou are editing this file in '{}'.", |
| 4 | editrust-analyzer cargo edit 0.1.5 crate/::get_editorrust-analyzer cargo edit 0.1.5 get_editor().() |
| 5 | .expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("can't find an editor") |
| 6 | .to_strrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]to_str().() |
| 7 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() |
| 8 | ); |
| 9 | let edited = editrust-analyzer cargo edit 0.1.5 crate/::editrust-analyzer cargo edit 0.1.5 edit().(string).expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("editing failed"); |
| 10 | printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!("after editing:\n{}", edited); |
| 11 | } |