Skip to content

Commit

Permalink
Remove unused since versions
Browse files Browse the repository at this point in the history
  • Loading branch information
schneems committed Dec 19, 2024
1 parent 580ca5b commit f5e8ab8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 22 deletions.
10 changes: 2 additions & 8 deletions commons/src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@ pub mod cache_buddy;
mod configure_env_layer;
mod default_env_layer;

#[deprecated(
since = "0.0.0",
note = "Use the struct layer API in the latest libcnb.rs instead"
)]
#[deprecated(note = "Use the struct layer API in the latest libcnb.rs instead")]
pub use self::configure_env_layer::ConfigureEnvLayer;

#[deprecated(
since = "0.0.0",
note = "Use the struct layer API in the latest libcnb.rs instead"
)]
#[deprecated(note = "Use the struct layer API in the latest libcnb.rs instead")]
pub use self::default_env_layer::DefaultEnvLayer;
2 changes: 1 addition & 1 deletion commons/src/output/build_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use std::time::{Duration, Instant};
/// To log inside of a layer see [`section_log`].
#[derive(Debug)]
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub struct BuildLog<T, W: Debug> {
pub(crate) io: W,
pub(crate) data: BuildData,
Expand Down
12 changes: 6 additions & 6 deletions commons/src/output/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,38 @@ use const_format::formatcp;
use std::fmt::Write;

/// Decorated str for prefixing "Help:"
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub const HELP: &str = formatcp!("{IMPORTANT_COLOR}! HELP{RESET}");

/// Decorated str for prefixing "Debug info:"
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub const DEBUG_INFO: &str = formatcp!("{IMPORTANT_COLOR}Debug info{RESET}");

/// Decorate a URL for the build output
#[must_use]
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub fn url(contents: impl AsRef<str>) -> String {
colorize(URL_COLOR, contents)
}

/// Decorate the name of a command being run i.e. `bundle install`
#[must_use]
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub fn command(contents: impl AsRef<str>) -> String {
value(colorize(COMMAND_COLOR, contents.as_ref()))
}

/// Decorate an important value i.e. `2.3.4`
#[must_use]
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub fn value(contents: impl AsRef<str>) -> String {
let contents = colorize(VALUE_COLOR, contents.as_ref());
format!("`{contents}`")
}

/// Decorate additional information at the end of a line
#[must_use]
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub fn details(contents: impl AsRef<str>) -> String {
let contents = contents.as_ref();
format!("({contents})")
Expand Down
14 changes: 7 additions & 7 deletions commons/src/output/section_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use std::marker::PhantomData;
///
/// log_step("Clearing cache (ruby version changed)");
/// ```
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub fn log_step(s: impl AsRef<str>) {
logger().step(s.as_ref());
}
Expand All @@ -62,15 +62,15 @@ pub fn log_step(s: impl AsRef<str>) {
/// ```
///
/// Timing information will be output at the end of the step.
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub fn log_step_timed<T>(s: impl AsRef<str>, f: impl FnOnce() -> T) -> T {
let timer = logger().step_timed(s.as_ref());
let out = f();
timer.finish_timed_step();
out
}

#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub fn log_step_stream<T>(
s: impl AsRef<str>,
f: impl FnOnce(&mut Box<dyn StreamLogger>) -> T,
Expand All @@ -82,25 +82,25 @@ pub fn log_step_stream<T>(
}

/// Print an error block to the output
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub fn log_error(s: impl AsRef<str>) {
logger().announce().error(s.as_ref());
}

/// Print an warning block to the output
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub fn log_warning(s: impl AsRef<str>) {
logger().announce().warning(s.as_ref());
}

/// Print an warning block to the output at a later time
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub fn log_warning_later(s: impl AsRef<str>) {
logger().announce().warn_later(s.as_ref());
}

/// Print an important block to the output
#[deprecated(since = "0.0.0", note = "Use `bullet_stream` instead")]
#[deprecated(note = "Use `bullet_stream` instead")]
pub fn log_important(s: impl AsRef<str>) {
logger().announce().important(s.as_ref());
}
Expand Down

0 comments on commit f5e8ab8

Please sign in to comment.