Skip to content

Commit

Permalink
ci: add github actions workflow (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo Paris authored May 29, 2024
1 parent c2f943e commit 0a8aa1a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: test suite
on:
push:
branches: main
pull_request:

jobs:
test:
name: Build and Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy, rustfmt
- name: Build and test
run: cargo test --all-features
- name: Lint
run: cargo clippy -- -Dwarnings
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ impl Context {
}

impl Context {
fn add_node<'a>(
fn add_node(
&mut self,
idx: usize,
NodeConstructor {
Expand All @@ -496,7 +496,7 @@ impl Context {
attributes,
pos: _,
args,
}: NodeConstructor<'a>,
}: NodeConstructor<'_>,
ui: &mut egui::Ui,
) {
let node = &mut self.nodes.pool[idx];
Expand Down
3 changes: 2 additions & 1 deletion src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ impl Default for NodeData {
/// This is used so that the nodes can be rendered in the context depth order
#[derive(Derivative, Default)]
#[derivative(Debug)]
#[allow(clippy::type_complexity)]
pub struct NodeConstructor<'a> {
//node: &'a mut NodeData,
pub(crate) id: usize,
Expand All @@ -126,7 +127,7 @@ pub struct NodeConstructor<'a> {
pub(crate) args: NodeArgs,
}

impl<'a, 'b> NodeConstructor<'a> {
impl<'a> NodeConstructor<'a> {
/// Create a new node to be displayed in a Context.
/// id should be the same accross frames and should not be the same as any other currently used nodes
pub fn new(id: usize, args: NodeArgs) -> Self {
Expand Down

0 comments on commit 0a8aa1a

Please sign in to comment.