Skip to content

Commit

Permalink
docs: Examples -> Example
Browse files Browse the repository at this point in the history
- there's no need for a plural when it only have 1 example
  • Loading branch information
AndrielFR committed Jan 6, 2025
1 parent 1fbc2e8 commit af10fbf
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 57 deletions.
60 changes: 30 additions & 30 deletions lib/ferogram/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub struct Client {
impl Client {
/// Creates a new bot instance.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # use ferogram::Client;
Expand All @@ -62,7 +62,7 @@ impl Client {

/// Creates a new user instance.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # use ferogram::Client;
Expand All @@ -84,7 +84,7 @@ impl Client {
/// * `API_ID`: developer's API ID from my.telegram.org
/// * `API_HASH`: developer's API HASH from my.telegram.org
///
/// # Examples
/// # Example
///
/// ```no_run
/// # use ferogram::Client;
Expand Down Expand Up @@ -117,7 +117,7 @@ impl Client {

/// Connects to the Telegram server, but don't listen to updates.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand Down Expand Up @@ -174,7 +174,7 @@ impl Client {

/// Gets the inner grammers' `Client` instance.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -187,7 +187,7 @@ impl Client {

/// Configures the dispatcher.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -203,7 +203,7 @@ impl Client {

/// Whether the client is connected.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -216,7 +216,7 @@ impl Client {

/// Creates a new context which not holds an update.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -231,7 +231,7 @@ impl Client {

/// Listen to Telegram's updates and send them to the dispatcher's routers.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand Down Expand Up @@ -326,7 +326,7 @@ impl Client {

/// Keeps the connection open, but doesn't listen to the updates.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand Down Expand Up @@ -381,7 +381,7 @@ pub struct ClientBuilder {
impl ClientBuilder {
/// Creates a new builder to bot instance.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -399,7 +399,7 @@ impl ClientBuilder {

/// Creates a new builder to user instance.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -417,7 +417,7 @@ impl ClientBuilder {

/// Builds the `Client` instance.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand Down Expand Up @@ -457,7 +457,7 @@ impl ClientBuilder {
///
/// Connects to the Telegram server, but don't listen to updates.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -473,7 +473,7 @@ impl ClientBuilder {
///
/// You may obtain your own in <https://my.telegram.org/auth>.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -489,7 +489,7 @@ impl ClientBuilder {
///
/// You may obtain your own in <https://my.telegram.org/auth>.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -504,7 +504,7 @@ impl ClientBuilder {
/// Session storage where data should persist, such as authorization key, server address,
/// and other required information by the client.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -520,7 +520,7 @@ impl ClientBuilder {
///
/// Telegram uses to know your device in devices settings.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -536,7 +536,7 @@ impl ClientBuilder {
///
/// Telegram uses to know your system version in devices settings.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -552,7 +552,7 @@ impl ClientBuilder {
///
/// Telegram uses to know your app version in device settings.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -568,7 +568,7 @@ impl ClientBuilder {
///
/// Telegram uses internally to let others know your language.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -584,7 +584,7 @@ impl ClientBuilder {
///
/// By default, updates sent while the client was offline are ignored.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -601,7 +601,7 @@ impl ClientBuilder {
/// field can be used to override said address, and is most commonly used to connect to one
/// of Telegram's test servers instead.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -626,7 +626,7 @@ impl ClientBuilder {
/// On flood, the library will retry *once*. If the flood error occurs a second time after
/// sleeping, the error will be returned.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand Down Expand Up @@ -658,7 +658,7 @@ impl ClientBuilder {
///
/// When the limit is `Some`, a buffer to hold that many updates will be pre-allocated.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -674,7 +674,7 @@ impl ClientBuilder {
///
/// Otherwise the code will continue running until it finds the end.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -700,7 +700,7 @@ impl ClientBuilder {
///
/// Executed when the client loses the connection or the Telegram server closes it.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand Down Expand Up @@ -733,7 +733,7 @@ impl ClientBuilder {
///
/// Executed when any `handler` returns an error.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -753,7 +753,7 @@ impl ClientBuilder {
///
/// Executed when the client is about to exit.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand All @@ -778,7 +778,7 @@ impl ClientBuilder {
///
/// Executed when the client is ready to receive updates.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example(client: ferogram::Client) {
Expand Down
14 changes: 7 additions & 7 deletions lib/ferogram/src/di.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct Injector {
impl Injector {
/// Count of resources stored.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -50,7 +50,7 @@ impl Injector {

/// Check if the injector is empty.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -64,7 +64,7 @@ impl Injector {

/// Insert a new resource.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -81,7 +81,7 @@ impl Injector {

/// Insert a new resource.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -96,7 +96,7 @@ impl Injector {

/// Extend the resources with the resources of another injector.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -112,7 +112,7 @@ impl Injector {

/// Remove a resource.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -129,7 +129,7 @@ impl Injector {

/// Get a reference for a resource.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand Down
12 changes: 6 additions & 6 deletions lib/ferogram/src/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct Dispatcher {
impl Dispatcher {
/// Attachs a new router.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -53,7 +53,7 @@ impl Dispatcher {

/// Attachs a injector.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -74,7 +74,7 @@ impl Dispatcher {
///
/// Same as `resources`.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -92,7 +92,7 @@ impl Dispatcher {
///
/// By default, the client will not handle updates from itself.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand All @@ -109,7 +109,7 @@ impl Dispatcher {
///
/// A plugin is a collection of routers.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand Down Expand Up @@ -141,7 +141,7 @@ impl Dispatcher {
///
/// Returns `Ok(())` if the update was handled.
///
/// # Examples
/// # Example
///
/// ```no_run
/// # async fn example() {
Expand Down
2 changes: 1 addition & 1 deletion lib/ferogram/src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub trait Filter: CloneFilter + Send + Sync + 'static {
}
}

/// Returns the filter as a `Any` trait object..
/// Returns the filter as a `Any` trait object.
fn as_any(&self) -> &dyn Any
where
Self: Sized,
Expand Down
Loading

0 comments on commit af10fbf

Please sign in to comment.