3 releases
0.1.2 | Nov 21, 2024 |
---|---|
0.1.1 | Nov 10, 2024 |
0.1.0 | Nov 6, 2024 |
#6 in #refactoring
289 downloads per month
3KB
rust_refactor
A library for automated code refactoring in Rust.
Features
- Extract functions from code snippets.
- Rename variables throughout a codebase.
Installation
To use rust_refactor
, add the following to your Cargo.toml
:
[dependencies]
rust_refactor = "0.1.0"
Usage
use rust_refactor::refactor;
fn main() {
let code = "let x = 5; x + 1";
let extracted = refactor::extract_function(code, "my_func");
println!("{}", extracted);
let renamed = refactor::rename_variable(code, "x", "y");
println!("{}", renamed);
}
License
This project is licensed under the MIT License
Running the Project
- Build the project:
cargo build
Author
bensatlantik