Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ljeub-pometry committed Sep 18, 2023
1 parent 5588ab6 commit ff2094a
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 32 deletions.
2 changes: 1 addition & 1 deletion examples/custom_python_extension/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fn py_custom_algorithm(graph: DynamicGraph) -> usize {
}

#[pymodule]
fn custom_python_extension(py: Python<'_>, m: &PyModule) -> PyResult<()> {
fn custom_python_extension(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
m.add_function(wrap_pyfunction!(py_custom_algorithm, m)?)?;
Ok(())
}
2 changes: 1 addition & 1 deletion python/src/graphql.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use pyo3::{exceptions, prelude::*};
use raphtory_core::{
db::api::view::internal::{DynamicGraph, MaterializedGraph},
db::api::view::internal::MaterializedGraph,
prelude::Graph,
python::{graph::graph::PyGraph, utils::errors::adapt_err_value},
};
Expand Down
2 changes: 1 addition & 1 deletion raphtory-graphql/src/model/graph/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use raphtory::{
},
graph::edge::EdgeView,
},
prelude::{EdgeViewOps, PropertyAdditionOps},
prelude::EdgeViewOps,
search::IndexedGraph,
};

Expand Down
2 changes: 1 addition & 1 deletion raphtory-graphql/src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use dynamic_graphql::{
use itertools::Itertools;
use raphtory::{
core::Prop,
db::api::view::internal::{CoreGraphOps, DynamicGraph, IntoDynamic, MaterializedGraph},
db::api::view::internal::{CoreGraphOps, IntoDynamic, MaterializedGraph},
prelude::{Graph, GraphViewOps, PropertyAdditionOps},
search::IndexedGraph,
};
Expand Down
2 changes: 1 addition & 1 deletion raphtory-graphql/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
};
use async_graphql_poem::GraphQL;
use poem::{get, listener::TcpListener, middleware::Cors, EndpointExt, Route, Server};
use raphtory::{db::api::view::internal::DynamicGraph, prelude::Graph};
use raphtory::prelude::Graph;
use std::collections::HashMap;
use tokio::{io::Result as IoResult, signal};
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Registry};
Expand Down
5 changes: 0 additions & 5 deletions raphtory/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ pub enum PropType {
Graph,
}

pub struct PropId {
id: usize,
dtype: PropType,
}

/// Denotes the types of properties allowed to be stored in the graph.
#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
pub enum Prop {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
core::{
entities::{edges::edge_store::EdgeStore, vertices::vertex_store::VertexStore, EID, VID},
storage::{timeindex::TimeIndexEntry, EntryMut},
entities::{EID, VID},
storage::timeindex::TimeIndexEntry,
utils::errors::GraphError,
Prop, PropType,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{
core::{
entities::{EID, VID},
storage::timeindex::TimeIndexEntry,
utils::errors::{GraphError, IllegalMutate},
utils::errors::GraphError,
Prop,
},
db::api::view::internal::Base,
Expand Down
10 changes: 7 additions & 3 deletions raphtory/src/db/api/mutation/mod.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
use crate::{
core::utils::time::{error::ParseTimeError, TryIntoTime},
core::{
utils::{
errors::GraphError,
time::{error::ParseTimeError, TryIntoTime},
},
PropType,
},
prelude::Prop,
};
use std::iter;

mod addition_ops;
mod deletion_ops;
pub mod internal;
mod property_addition_ops;

use crate::core::{utils::errors::GraphError, PropType};
pub use addition_ops::AdditionOps;
pub use deletion_ops::DeletionOps;
pub use property_addition_ops::PropertyAdditionOps;
Expand Down
1 change: 0 additions & 1 deletion raphtory/src/db/api/mutation/property_addition_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::{
core::{
storage::timeindex::TimeIndexEntry,
utils::{errors::GraphError, time::TryIntoTime},
Prop,
},
db::api::mutation::{
internal::{InternalAdditionOps, InternalPropertyAdditionOps},
Expand Down
4 changes: 2 additions & 2 deletions raphtory/src/db/api/view/internal/materialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use crate::{
storage::{
locked_view::LockedView,
timeindex::{LockedLayeredIndex, TimeIndex, TimeIndexEntry},
ArcEntry, EntryMut,
ArcEntry,
},
utils::errors::{GraphError, IllegalMutate},
utils::errors::GraphError,
Direction, PropType,
},
db::{
Expand Down
7 changes: 2 additions & 5 deletions raphtory/src/db/graph/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ use crate::{
core::{
entities::{edges::edge_ref::EdgeRef, VID},
storage::{locked_view::LockedView, timeindex::TimeIndexEntry},
utils::{
errors::{GraphError, MutateGraphError},
time::IntoTime,
},
utils::{errors::GraphError, time::IntoTime},
},
db::{
api::{
Expand Down Expand Up @@ -116,7 +113,7 @@ impl<G: GraphViewOps + InternalPropertyAdditionOps + InternalAdditionOps> EdgeVi
props: C,
layer: Option<&str>,
) -> Result<(), GraphError> {
let mut properties: Vec<(usize, Prop)> = props.collect_properties(|name, dtype| {
let properties: Vec<(usize, Prop)> = props.collect_properties(|name, dtype| {
self.graph.resolve_edge_property(name, dtype, true)
})?;
let input_layer_id = self.resolve_layer(layer)?;
Expand Down
9 changes: 3 additions & 6 deletions raphtory/src/db/internal/addition.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
use crate::{
core::{
entities::{
edges::edge_store::EdgeStore, graph::tgraph::InnerTemporalGraph,
vertices::vertex_store::VertexStore, EID, VID,
},
storage::{timeindex::TimeIndexEntry, EntryMut},
entities::{graph::tgraph::InnerTemporalGraph, EID, VID},
storage::timeindex::TimeIndexEntry,
utils::errors::GraphError,
PropType,
},
db::api::mutation::internal::InternalAdditionOps,
prelude::{Graph, Prop},
prelude::Prop,
};
use std::sync::atomic::Ordering;

Expand Down
4 changes: 2 additions & 2 deletions raphtory/src/db/internal/prop_add.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::{
core::{
entities::{graph::tgraph::InnerTemporalGraph, EID, VID},
storage::{lazy_vec::IllegalSet, timeindex::TimeIndexEntry},
utils::errors::{GraphError, IllegalMutate},
storage::timeindex::TimeIndexEntry,
utils::errors::GraphError,
},
db::api::{mutation::internal::InternalPropertyAdditionOps, view::internal::CoreGraphOps},
prelude::Prop,
Expand Down

0 comments on commit ff2094a

Please sign in to comment.