Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 07b567a

Browse files
ok
1 parent 3f664a2 commit 07b567a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

‎crates/pgt_hover/src/contextual_priority.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ mod tests {
185185
assert_eq!(result.len(), 1);
186186
assert_eq!(result[0].table_name, "users");
187187
assert_eq!(result[0].schema_name, "auth");
188-
assert_eq!(result[0].is_primary_key,true);
188+
assert!(result[0].is_primary_key);
189189
}
190190

191191
#[test]
@@ -227,6 +227,6 @@ mod tests {
227227
assert_eq!(result.len(), 1);
228228
assert_eq!(result[0].table_name, "posts");
229229
assert_eq!(result[0].schema_name, "public");
230-
assert_eq!(result[0].is_primary_key,false);
230+
assert!(!result[0].is_primary_key);
231231
}
232232
}

‎crates/pgt_hover/src/hovered_item.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl<'a> From<&'a pgt_schema_cache::Column> for HoverItem<'a> {
1919
}
2020
}
2121

22-
impl<'a> ContextualPriority for HoverItem<'a> {
22+
impl ContextualPriority for HoverItem<'_> {
2323
fn relevance_score(&self, ctx: &pgt_treesitter::TreesitterContext) -> f32 {
2424
match self {
2525
HoverItem::Table(table) => table.relevance_score(ctx),
@@ -28,7 +28,7 @@ impl<'a> ContextualPriority for HoverItem<'a> {
2828
}
2929
}
3030

31-
impl<'a> ToHoverMarkdown for HoverItem<'a> {
31+
impl ToHoverMarkdown for HoverItem<'_> {
3232
fn hover_headline<W: std::fmt::Write>(&self, writer: &mut W) -> Result<(), std::fmt::Error> {
3333
match self {
3434
HoverItem::Table(table) => ToHoverMarkdown::hover_headline(*table, writer),

‎crates/pgt_hover/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub fn on_hover(params: OnHoverParams) -> Vec<String> {
3434
.schema_cache
3535
.find_tables(n.as_str(), None)
3636
.into_iter()
37-
.map(|t| HoverItem::from(t))
37+
.map(HoverItem::from)
3838
.collect(),
3939

4040
hovered_node::NodeIdentification::SchemaAndName((s, n)) => params

‎crates/pgt_schema_cache/src/columns.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ mod tests {
185185
assert!(!user_middle_name_col.is_unique);
186186
assert_eq!(user_middle_name_col.varchar_length, Some(255));
187187

188-
let properties_owner_id_cols = cache
189-
.find_cols("owner_id", Some("properties"), Some("real_estate"));
188+
let properties_owner_id_cols =
189+
cache.find_cols("owner_id", Some("properties"), Some("real_estate"));
190190
let properties_owner_id_col = properties_owner_id_cols.first().unwrap();
191191
assert_eq!(
192192
properties_owner_id_col.class_kind,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /