Skip to content

Commit 52e1245

Browse files
camelidJoshua Nelson
authored and
Joshua Nelson
committed
Update root crate name
cratesfyi -> docs-rs I did not change the name of the binary because of @jyn514's concerns about having to change all the scripts in production to use the new name.
1 parent 50e3852 commit 52e1245

File tree

3 files changed

+71
-75
lines changed

3 files changed

+71
-75
lines changed

Cargo.lock

Lines changed: 61 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "cratesfyi"
2+
name = "docs-rs"
33
version = "0.6.0"
44
authors = ["Onur Aslan <[email protected]>", "The Rust Project Developers"]
55
readme = "README.md"

src/bin/cratesfyi.rs

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use std::fmt::Write;
33
use std::path::PathBuf;
44
use std::sync::Arc;
55

6-
use cratesfyi::db::{self, add_path_into_database, Pool, PoolClient};
7-
use cratesfyi::utils::{remove_crate_priority, set_crate_priority};
8-
use cratesfyi::{
6+
use docs_rs::db::{self, add_path_into_database, Pool, PoolClient};
7+
use docs_rs::utils::{remove_crate_priority, set_crate_priority};
8+
use docs_rs::{
99
BuildQueue, Config, Context, DocBuilder, Index, Metrics, RustwideBuilder, Server, Storage,
1010
};
1111
use failure::{err_msg, Error, ResultExt};
@@ -33,7 +33,7 @@ pub fn main() {
3333
fn logger_init() {
3434
use std::io::Write;
3535

36-
let env = env_logger::Env::default().filter_or("DOCSRS_LOG", "cratesfyi=info");
36+
let env = env_logger::Env::default().filter_or("DOCSRS_LOG", "docs_rs=info");
3737
let logger = env_logger::from_env(env)
3838
.format(|buf, record| {
3939
writeln!(
@@ -61,7 +61,7 @@ enum Toggle {
6161
#[structopt(
6262
name = "cratesfyi",
6363
about = env!("CARGO_PKG_DESCRIPTION"),
64-
version = cratesfyi::BUILD_VERSION,
64+
version = docs_rs::BUILD_VERSION,
6565
rename_all = "kebab-case",
6666
)]
6767
enum CommandLine {
@@ -125,7 +125,7 @@ impl CommandLine {
125125
log::warn!("--foreground was passed, but there is no need for it anymore");
126126
}
127127

128-
cratesfyi::utils::start_daemon(&ctx, registry_watcher == Toggle::Enabled)?;
128+
docs_rs::utils::start_daemon(&ctx, registry_watcher == Toggle::Enabled)?;
129129
}
130130
Self::Database { subcommand } => subcommand.handle_args(ctx)?,
131131
Self::Queue { subcommand } => subcommand.handle_args(ctx)?,
@@ -412,7 +412,7 @@ impl DatabaseSubcommand {
412412
}
413413

414414
Self::UpdateGithubFields => {
415-
cratesfyi::utils::GithubUpdater::new(&*ctx.config()?, ctx.pool()?)?
415+
docs_rs::utils::GithubUpdater::new(&*ctx.config()?, ctx.pool()?)?
416416
.update_all_crates()?;
417417
}
418418

@@ -433,7 +433,7 @@ impl DatabaseSubcommand {
433433

434434
// FIXME: This is actually util command not database
435435
Self::UpdateReleaseActivity => {
436-
cratesfyi::utils::update_release_activity(&mut *ctx.conn()?)
436+
docs_rs::utils::update_release_activity(&mut *ctx.conn()?)
437437
.context("Failed to update release activity")?
438438
}
439439

@@ -448,11 +448,7 @@ impl DatabaseSubcommand {
448448
Self::Blacklist { command } => command.handle_args(ctx)?,
449449

450450
Self::Synchronize { dry_run } => {
451-
cratesfyi::utils::consistency::run_check(
452-
&mut *ctx.conn()?,
453-
&*ctx.index()?,
454-
dry_run,
455-
)?;
451+
docs_rs::utils::consistency::run_check(&mut *ctx.conn()?, &*ctx.index()?, dry_run)?;
456452
}
457453
}
458454
Ok(())

0 commit comments

Comments
 (0)