Skip to content

Commit 46798d0

Browse files
committed
Fix rustfmt issues
1 parent b78e0db commit 46798d0

File tree

22 files changed

+37
-41
lines changed

22 files changed

+37
-41
lines changed

examples/app/access.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
//!
1111
//! Note that you need to enable the `access` feature in your `Cargo.toml`.
1212
use carapax::{
13+
Chain,
1314
access::{AccessExt, AccessRule, InMemoryAccessPolicy},
1415
types::Update,
15-
Chain,
1616
};
1717

1818
pub fn setup(chain: Chain, username: &str) -> Chain {

examples/app/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
//! it ensures that the handler is executed only when an incoming update
55
//! contains a message with the `/hello` command.
66
use carapax::{
7+
Chain, CommandExt, Ref,
78
api::Client,
89
types::{ChatPeerId, SendMessage, User},
9-
Chain, CommandExt, Ref,
1010
};
1111

1212
use crate::error::AppError;

examples/app/dialogue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
use serde::{Deserialize, Serialize};
2626

2727
use carapax::{
28+
Chain, CommandPredicate, Ref,
2829
api::Client,
2930
dialogue::{DialogueExt, DialogueInput, DialogueResult, DialogueState},
3031
session::backend::fs::FilesystemBackend,
3132
types::{ChatPeerId, SendMessage, Text},
32-
Chain, CommandPredicate, Ref,
3333
};
3434

3535
use crate::error::AppError;

examples/app/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
use std::{env, time::Duration};
55

66
use dotenvy::dotenv;
7-
use seance::{backend::fs::FilesystemBackend, SessionCollector, SessionManager};
7+
use seance::{SessionCollector, SessionManager, backend::fs::FilesystemBackend};
88
use tempfile::tempdir;
99

10-
use carapax::{api::Client, handler::LongPoll, App, Chain, Context, ErrorExt, HandlerError};
10+
use carapax::{App, Chain, Context, ErrorExt, HandlerError, api::Client, handler::LongPoll};
1111

1212
mod access;
1313
mod command;

examples/app/predicate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
//! | `Result<T, E>::Ok` | `PredicateResult::from::<T>()` |
1616
//! | `Result<T, E>::Err` | [`carapax::PredicateResult::Err`] |
1717
use carapax::{
18+
Chain, PredicateExt, Ref,
1819
api::Client,
1920
types::{ChatPeerId, SendMessage, Text},
20-
Chain, PredicateExt, Ref,
2121
};
2222

2323
use crate::error::AppError;

examples/app/ratelimit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
use std::time::Duration;
1818

1919
use carapax::{
20+
Chain, PredicateExt,
2021
ratelimit::{
21-
nonzero, DirectRateLimitPredicate, Jitter, KeyChat, KeyChatUser, KeyUser, KeyedRateLimitPredicate, Quota,
22+
DirectRateLimitPredicate, Jitter, KeyChat, KeyChatUser, KeyUser, KeyedRateLimitPredicate, Quota, nonzero,
2223
},
23-
Chain, PredicateExt,
2424
};
2525

2626
pub fn setup(chain: Chain, strategy: &str) -> Chain {

examples/app/session.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
//! Note that you need to enable either the `session-fs` or `session-redis` feature in `Cargo.toml`.
2424
//! Alternatively, use the `session` feature if you have your own backend.
2525
use carapax::{
26+
Chain, CommandExt, Ref,
2627
api::Client,
27-
session::{backend::fs::FilesystemBackend, Session},
28+
session::{Session, backend::fs::FilesystemBackend},
2829
types::{ChatPeerId, Command, SendMessage},
29-
Chain, CommandExt, Ref,
3030
};
3131

3232
use crate::error::AppError;

examples/echo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ use std::env;
5050
use dotenvy::dotenv;
5151

5252
use carapax::{
53+
App, Context, Ref,
5354
api::{Client, ExecuteError},
5455
handler::{LongPoll, WebhookServer},
5556
types::{ChatPeerId, SendMessage, Text},
56-
App, Context, Ref,
5757
};
5858

5959
const DEBUG: bool = true;

src/access/policy/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{convert::Infallible, error::Error, future::Future, sync::Arc};
22

3-
use futures_util::future::{ok, Ready};
3+
use futures_util::future::{Ready, ok};
44

55
use crate::{access::rule::AccessRule, core::HandlerInput};
66

src/access/predicate/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{error::Error, fmt};
22

3-
use futures_util::future::{err, ok, Ready};
3+
use futures_util::future::{Ready, err, ok};
44

55
use crate::{
66
core::HandlerInput,

0 commit comments

Comments
 (0)