File tree Expand file tree Collapse file tree 1 file changed +20
-7
lines changed
Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -42,15 +42,28 @@ Options:
4242
4343## Library Usage
4444
45+ In your ` Cargo.toml ` file.
46+
47+ ``` toml
48+ [dependencies ]
49+ git-warp-time = " 0.5"
50+ ```
51+
52+ Then use the crate functions and types in your project something like this:
53+
4554``` rust
4655use git_warp_time :: {get_repo, reset_mtime};
47- let repo = get_repo (). unwrap ();
48- let mut paths = git_warp_time :: FileSet :: new ();
49- paths . insert (" foo.txt" . to_string ());
50- let mut opts = git_warp_time :: Options :: new ();
51- opts . verbose (true ). paths (Some (paths ));
52- let files = reset_mtime (repo , opts ). unwrap ();
53- println! (" Actioned files: {:?}" , files );
56+ use git_warp_time :: {FileSet , Options };
57+
58+ fn main () {
59+ let repo = get_repo (). unwrap ();
60+ let mut paths = FileSet :: new ();
61+ paths . insert (" foo.txt" . to_string ());
62+ let mut opts = Options :: new ();
63+ opts . verbose (true ). paths (Some (paths ));
64+ let files = reset_mtime (repo , opts ). unwrap ();
65+ println! (" Actioned files: {:?}" , files );
66+ }
5467```
5568
5669# The story
You can’t perform that action at this time.
0 commit comments