Paste or upload both texts above and click "Compare" to see the differences.
Compare Rust Code Online
Use MyTextDiff to compare two files or snippets of Rust code and quickly identify what changed in functions, structs, traits and logic in your program. The comparison is done right in the browser, with nothing to install.
When you select Rust for syntax highlighting, the result colors comments (// and /* */), strings and keywords like fn, let, mut, struct and impl.
Can I compare .rs files directly?
Yes. You can paste the code or upload the .rs file directly into the comparison fields.
Does the syntax highlighting recognize Rust's Option and Result?
Yes. Terms like Some, None, Ok and Err — used in the Option and Result types — are recognized and highlighted as keywords in the result, as are match, unsafe and dyn.