Skip to content

Commit

Permalink
Update deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mplanchard committed Jan 22, 2023
1 parent e2fcaac commit 62e36cf
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions crates/cuid1/src/cuid1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ static FINGERPRINT: Lazy<String> =
/// ```
#[deprecated(
since = "1.3.0",
note = "cuid() is deprecated. Use cuid2() instead. See https://github.com/paralleldrive/cuid2#improvements-over-cuid for more information"
note = "cuid() is deprecated. Use cuid2() instead, or switch to the cuid2 crate. See \
https://github.com/paralleldrive/cuid2#improvements-over-cuid for more information"
)]
#[inline]
pub fn cuid() -> Result<String, CuidError> {
Expand Down Expand Up @@ -85,7 +86,9 @@ pub fn cuid() -> Result<String, CuidError> {
/// ```
#[deprecated(
since = "1.3.0",
note = "slug() is based on cuid(), which is deprecated. Use cuid2() instead. See https://github.com/paralleldrive/cuid2#improvements-over-cuid for more information"
note = "slug() is based on cuid(), which is deprecated. Use cuid2() instead, \
or switch to the cuid2 crate. See \
https://github.com/paralleldrive/cuid2#improvements-over-cuid for more information"
)]
#[inline]
pub fn slug() -> Result<String, CuidError> {
Expand Down Expand Up @@ -113,7 +116,9 @@ pub fn slug() -> Result<String, CuidError> {
/// ```
#[deprecated(
since = "1.3.0",
note = "is_cuid() is based on cuid(), which is deprecated. Use cuid2() instead. See https://github.com/paralleldrive/cuid2#improvements-over-cuid for more information"
note = "is_cuid() is based on cuid(), which is deprecated. Use cuid2() instead, \
or switch to the cuid2 crate. See \
https://github.com/paralleldrive/cuid2#improvements-over-cuid for more information"
)]
#[inline]
pub fn is_cuid<S: AsRef<str>>(to_check: S) -> bool {
Expand Down Expand Up @@ -142,7 +147,9 @@ pub fn is_cuid<S: AsRef<str>>(to_check: S) -> bool {
/// ```
#[deprecated(
since = "1.3.0",
note = "is_slug() is based on cuid(), which is deprecated. Use cuid2() instead. See https://github.com/paralleldrive/cuid2#improvements-over-cuid for more information"
note = "is_slug() is based on cuid(), which is deprecated. Use cuid2() instead, \
or switch to the cuid2 crate. See \
https://github.com/paralleldrive/cuid2#improvements-over-cuid for more information"
)]
#[inline]
pub fn is_slug<S: AsRef<str>>(to_check: S) -> bool {
Expand Down

0 comments on commit 62e36cf

Please sign in to comment.