Skip to content

Commit c4d715b

Browse files
committed
Deprecated Profiles::new in favor of Profiles::new_profile
1 parent f57b3b9 commit c4d715b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/profile.rs

+9
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,16 @@ impl Profiles {
164164
/// Creates a new profile. It is not check if the maximum amount of profiles is already reached.
165165
/// Use [`Profiles::max_profiles`] and the length of [`Profiles::profiles`] to check it
166166
/// manually.
167+
#[allow(clippy::new_ret_no_self)]
168+
#[deprecated(since = "0.11.3", note = "Use `new_profile` instead")]
167169
pub async fn new(&self, profile_name: String, username: String) -> Result<Profile> {
170+
self.new_profile(profile_name, username).await
171+
}
172+
173+
/// Creates a new profile. It is not check if the maximum amount of profiles is already reached.
174+
/// Use [`Profiles::max_profiles`] and the length of [`Profiles::profiles`] to check it
175+
/// manually.
176+
pub async fn new_profile(&self, profile_name: String, username: String) -> Result<Profile> {
168177
let endpoint = "https://www.crunchyroll.com/accounts/v1/me/multiprofile";
169178
self.executor
170179
.post(endpoint)

0 commit comments

Comments
 (0)