Skip to content

Commit

Permalink
Linter step (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
blitzarx1 authored Nov 7, 2023
1 parent 164dd25 commit c9e3ae5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
- name: Build
run: cargo build --verbose

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lint
run: cargo clippy --verbose -- -D warnings

test:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 4 additions & 0 deletions src/graph_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,13 @@ impl<'a, N: Clone, E: Clone, Ty: EdgeType> GraphView<'a, N, E, Ty> {
self.publish_event(Event::NodeDeselect(PayloadNodeDeselect { id: idx.index() }));
}

#[allow(unused_variables)]
fn set_node_clicked(&mut self, idx: NodeIndex) {
#[cfg(feature = "events")]
self.publish_event(Event::NodeClick(PayloadNodeClick { id: idx.index() }));
}

#[allow(unused_variables)]
fn set_node_double_clicked(&mut self, idx: NodeIndex) {
#[cfg(feature = "events")]
self.publish_event(Event::NodeDoubleClick(PayloadNodeDoubleClick {
Expand Down Expand Up @@ -422,6 +424,7 @@ impl<'a, N: Clone, E: Clone, Ty: EdgeType> GraphView<'a, N, E, Ty> {
self.publish_event(Event::NodeDragEnd(PayloadNodeDragEnd { id: idx.index() }));
}

#[allow(unused_variables)]
fn set_pan(&self, val: Vec2, meta: &mut Metadata) {
let diff = val - meta.pan;
meta.pan = val;
Expand All @@ -430,6 +433,7 @@ impl<'a, N: Clone, E: Clone, Ty: EdgeType> GraphView<'a, N, E, Ty> {
self.publish_event(Event::Pan(PayloadPan { diff: diff.into() }));
}

#[allow(unused_variables)]
fn set_zoom(&self, val: f32, meta: &mut Metadata) {
let diff = val - meta.zoom;
meta.zoom = val;
Expand Down

0 comments on commit c9e3ae5

Please sign in to comment.