Skip to content
This repository was archived by the owner on Jul 6, 2024. It is now read-only.

Commit e96329c

Browse files
committed
fix: Fix lib.rs doc code.
1 parent 83e58c8 commit e96329c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@
3838
//!
3939
//! Login into a new session async:
4040
//! ```
41-
//! use proton_api_rs::{http, Session, SessionType};
41+
//! use proton_api_rs::{http, DefaultSession, SessionType};
4242
//! async fn example<T:http::ClientAsync>() {
4343
//! let client = http::ClientBuilder::new()
4444
//! .user_agent("MyUserAgent/0.0.0")
4545
//! .base_url("server_url")
4646
//! .app_version("MyApp@0.1.1")
4747
//! .build::<T>().unwrap();
4848
//!
49-
//! let session = match Session::login_async(&client, "my_address@proton.me", "my_proton_password").await.unwrap(){
49+
//! let session = match DefaultSession::login_async(&client, "my_address@proton.me", "my_proton_password").await.unwrap(){
5050
//! // Session is authenticated, no 2FA verifications necessary.
5151
//! SessionType::Authenticated(c) => c,
5252
//! // Session needs 2FA TOTP auth.
@@ -64,15 +64,15 @@
6464
//!
6565
//! Login into a new session sync:
6666
//! ```
67-
//! use proton_api_rs::{http, Session, SessionType};
67+
//! use proton_api_rs::{DefaultSession, http, Session, SessionType};
6868
//! fn example<T:http::ClientSync>() {
6969
//! let client = http::ClientBuilder::new()
7070
//! .user_agent("MyUserAgent/0.0.0")
7171
//! .base_url("server_url")
7272
//! .app_version("MyApp@0.1.1")
7373
//! .build::<T>().unwrap();
7474
//!
75-
//! let session = match Session::login(&client, "my_address@proton.me", "my_proton_password").unwrap(){
75+
//! let session = match DefaultSession::login(&client, "my_address@proton.me", "my_proton_password").unwrap(){
7676
//! // Session is authenticated, no 2FA verifications necessary.
7777
//! SessionType::Authenticated(c) => c,
7878
//! // Session needs 2FA TOTP auth.
@@ -90,7 +90,7 @@
9090
//!
9191
//! Login using a previous sessions token.
9292
//! ```
93-
//! use proton_api_rs::{http, Session, SessionType};
93+
//! use proton_api_rs::{http, DefaultSession, SessionType};
9494
//! use proton_api_rs::domain::UserUid;
9595
//!
9696
//! async fn example<T:http::ClientAsync>() {
@@ -102,7 +102,7 @@
102102
//! .app_version("MyApp@0.1.1")
103103
//! .build::<T>().unwrap();
104104
//!
105-
//! let session = Session::refresh_async(&client, &user_uid, &user_refresh_token).await.unwrap();
105+
//! let session = DefaultSession::refresh_async(&client, &user_uid, &user_refresh_token).await.unwrap();
106106
//!
107107
//! // session is now authenticated and can access the rest of the API.
108108
//! // ...

0 commit comments

Comments
 (0)