Skip to content

Commit 95bfc3c

Browse files
committed
chore: fix clippy
1 parent 4cf5c96 commit 95bfc3c

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

crates/api/src/opts/buf_attach.rs

+19-13
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ use crate::Buffer;
22
use crate::ToFunction;
33

44
/// Arguments passed to the callback registered to
5-
/// [`on_lines`](BufAttachOptsBuilder::on_lines). The `(a, b, c, d, e, f, g, h,
6-
/// i)` tuple represents:
5+
/// [`on_lines`](BufAttachOptsBuilder::on_lines).
6+
///
7+
/// The `(a, b, c, d, e, f, g, h, i)` tuple represents:
78
///
89
/// - `a`: the string literal `"lines"`;
910
/// - `b`: the [`Buffer`] that triggered the callback;
@@ -28,7 +29,9 @@ pub type OnLinesArgs = (
2829
Option<usize>,
2930
);
3031

31-
/// Arguments passed to the callback registered to [`on_bytes`](BufAttachOptsBuilder::on_bytes). The `(a, b, c, d, e, f, g, h, i, j, k, l)`
32+
/// Arguments passed to the callback registered to [`on_bytes`](BufAttachOptsBuilder::on_bytes).
33+
///
34+
/// The `(a, b, c, d, e, f, g, h, i, j, k, l)`
3235
/// - `a`: the string literal `"bytes"`;
3336
/// - `b`: the [`Buffer`] that triggered the callback;
3437
/// - `c`: the value of the buffer-local `b:changedtick` variable;
@@ -57,24 +60,27 @@ pub type OnBytesArgs = (
5760
);
5861

5962
/// Arguments passed to the callback registered to
60-
/// [`on_changedtick`](BufAttachOptsBuilder::on_changedtick). The first tuple
61-
/// element is the string literal `"changedtick"`, the second is the [`Buffer`]
62-
/// that triggered the callback and the third is current value of the
63-
/// buffer-local
63+
/// [`on_changedtick`](BufAttachOptsBuilder::on_changedtick).
64+
///
65+
/// The first tuple element is the string literal `"changedtick"`, the second
66+
/// is the [`Buffer`] that triggered the callback and the third is current
67+
/// value of the buffer-local
6468
/// [`b:changedtick`](https://neovim.io/doc/user/eval.html#b:changedtick)
6569
/// variable.
6670
pub type OnChangedtickArgs = (String, Buffer, u32);
6771

6872
/// Arguments passed to the callback registered to
69-
/// [`on_detach`](BufAttachOptsBuilder::on_detach). The first tuple element is
70-
/// the string literal `"detach"`, the second is the [`Buffer`] that triggered
71-
/// the callback.
73+
/// [`on_detach`](BufAttachOptsBuilder::on_detach).
74+
///
75+
/// The first tuple element is the string literal `"detach"`, the second is the
76+
/// [`Buffer`] that triggered the callback.
7277
pub type OnDetachArgs = (String, Buffer);
7378

7479
/// Arguments passed to the callback registered to
75-
/// [`on_reload`](BufAttachOptsBuilder::on_reload). The first tuple element is
76-
/// the string literal `"reload"`, the second is the [`Buffer`] that triggered
77-
/// the callback.
80+
/// [`on_reload`](BufAttachOptsBuilder::on_reload).
81+
///
82+
/// The first tuple element is the string literal `"reload"`, the second is the
83+
/// [`Buffer`] that triggered the callback.
7884
pub type OnReloadArgs = (String, Buffer);
7985

8086
/// All the registered callbacks can detach by returning `true`, as described

crates/api/src/types/command_args.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ use types::{
77

88
use crate::serde_utils as utils;
99

10-
/// Arguments passed to functions executed by commands. See
11-
/// [`Buffer::create_user_command`](crate::Buffer::create_user_command) to
10+
/// Arguments passed to functions executed by commands.
11+
///
12+
/// See [`Buffer::create_user_command`](crate::Buffer::create_user_command) to
1213
/// create a buffer-local command or
1314
/// [`create_user_command`](crate::create_user_command) to create a global one.
1415
#[non_exhaustive]

0 commit comments

Comments
 (0)