Skip to content

Commit 44ad219

Browse files
committed
Clippy
1 parent 3485ae6 commit 44ad219

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

crates/ty_server/src/document/range.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,26 +175,26 @@ impl PositionExt for lsp_types::Position {
175175
pub(crate) trait TextSizeExt {
176176
/// Converts this position to an `LspPosition`, which then requires an explicit
177177
/// decision about how to use it (as a local position or as a location).
178-
fn as_lsp_position(
179-
self,
180-
db: &dyn Db,
178+
fn as_lsp_position<'db>(
179+
&self,
180+
db: &'db dyn Db,
181181
file: File,
182182
encoding: PositionEncoding,
183-
) -> LspPosition<'_>
183+
) -> LspPosition<'db>
184184
where
185185
Self: Sized;
186186
}
187187

188188
impl TextSizeExt for TextSize {
189-
fn as_lsp_position(
190-
self,
191-
db: &dyn Db,
189+
fn as_lsp_position<'db>(
190+
&self,
191+
db: &'db dyn Db,
192192
file: File,
193193
encoding: PositionEncoding,
194-
) -> LspPosition<'_> {
194+
) -> LspPosition<'db> {
195195
LspPosition {
196196
file,
197-
position: self,
197+
position: *self,
198198
db,
199199
encoding,
200200
}

0 commit comments

Comments
 (0)