From 0f848386df4451dbf1510c7371b28392774ed9a0 Mon Sep 17 00:00:00 2001 From: bytedream Date: Wed, 22 May 2024 23:38:23 +0200 Subject: [PATCH] Deprecated `Profiles::new` in favor of `Profiles::new_profile` --- src/profile.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/profile.rs b/src/profile.rs index 538a612..fdcc2c1 100644 --- a/src/profile.rs +++ b/src/profile.rs @@ -164,7 +164,16 @@ impl Profiles { /// Creates a new profile. It is not check if the maximum amount of profiles is already reached. /// Use [`Profiles::max_profiles`] and the length of [`Profiles::profiles`] to check it /// manually. + #[allow(clippy::new_ret_no_self)] + #[deprecated(since = "0.11.3", note = "Use `new_profile` instead")] pub async fn new(&self, profile_name: String, username: String) -> Result { + self.new_profile(profile_name, username).await + } + + /// Creates a new profile. It is not check if the maximum amount of profiles is already reached. + /// Use [`Profiles::max_profiles`] and the length of [`Profiles::profiles`] to check it + /// manually. + pub async fn new_profile(&self, profile_name: String, username: String) -> Result { let endpoint = "https://www.crunchyroll.com/accounts/v1/me/multiprofile"; self.executor .post(endpoint)