File tree Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -6,21 +6,13 @@ use git2::{
66 Repository , Tree ,
77} ;
88use std:: str;
9+ use crate :: Index ;
910
1011static INDEX_GIT_URL : & str = "https://github.com/rust-lang/crates.io-index" ;
1112static LAST_SEEN_REFNAME : & str = "refs/heads/crates-index-diff_last-seen" ;
1213static EMPTY_TREE_HASH : & str = "4b825dc642cb6eb9a060e54bf8d69288fbee4904" ;
1314static LINE_ADDED_INDICATOR : char = '+' ;
1415
15- /// A wrapper for a repository of the crates.io index.
16- pub struct Index {
17- /// The name and path of the reference used to keep track of the last seen state of the
18- /// crates.io repository. The default value is `refs/heads/crates-index-diff_last-seen`.
19- pub seen_ref_name : & ' static str ,
20- /// The crates.io repository.
21- repo : Repository ,
22- }
23-
2416/// Options for use in `Index::from_path_or_cloned_with_options`
2517pub struct CloneOptions < ' a > {
2618 /// The url from which the repository should be cloned.
Original file line number Diff line number Diff line change 55#![ forbid( missing_docs) ]
66#![ deny( rust_2018_idioms) ]
77
8- mod index;
9- mod version;
8+ ///
9+ pub mod index;
10+ mod types;
1011
11- pub use index:: * ;
12- pub use version:: * ;
12+ pub use types:: { Index , Change , Dependency , CrateVersion } ;
1313
1414pub use git2;
Original file line number Diff line number Diff line change 11use std:: collections:: HashMap ;
22
33use std:: fmt;
4+ use git2:: Repository ;
5+
6+ /// A wrapper for a repository of the crates.io index.
7+ pub struct Index {
8+ /// The name and path of the reference used to keep track of the last seen state of the
9+ /// crates.io repository. The default value is `refs/heads/crates-index-diff_last-seen`.
10+ pub seen_ref_name : & ' static str ,
11+ /// The crates.io repository.
12+ pub ( crate ) repo : Repository ,
13+ }
414
515/// Identify a kind of change that occurred to a crate
616#[ derive( Clone , Eq , PartialEq , Debug ) ]
You can’t perform that action at this time.
0 commit comments