Skip to content

Commit

Permalink
Merge pull request #424 from pietroalbini/recognize-proc-macro
Browse files Browse the repository at this point in the history
Treat proc-macros as libraries
  • Loading branch information
pietroalbini authored Oct 8, 2019
2 parents e17ec5c + 98226db commit f7c40c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/db/add_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub(crate) fn add_package_into_database(conn: &Connection,
let readme = get_readme(metadata_pkg, source_dir).unwrap_or(None);
let (release_time, yanked, downloads) = try!(get_release_time_yanked_downloads(metadata_pkg));
let is_library = match metadata_pkg.targets[0].kind.as_slice() {
&[ref kind] if kind == "lib" => true,
&[ref kind] if kind == "lib" || kind == "proc-macro" => true,
_ => false,
};
let metadata = Metadata::from_source_dir(source_dir)?;
Expand Down

0 comments on commit f7c40c3

Please sign in to comment.