Skip to content

Commit

Permalink
try and fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jr1221 committed Aug 2, 2024
1 parent b4eda5b commit 51e41c1
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions scylla-server-rust/src/services/data_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ prisma::data::select! {public_data {
/// * `run_id` - The run id to filter the data
/// * `fetch_run` whether to fetch the run assocaited with this data
/// * `fetch_data_type` whether to fetch the data type associated with this data
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn get_data(
db: &Database,
data_type_name: String,
Expand All @@ -35,7 +35,7 @@ pub async fn get_data(
/// * `unix_time` - The time im miliseconds since unix epoch of the message
/// * `data_type_name` - The name of the data type, note this data type must already exist!
/// * `rin_id` - The run id to assign the data point to, note this run must already exist!
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn add_data(
db: &Database,
client_data: ClientData,
Expand Down
4 changes: 2 additions & 2 deletions scylla-server-rust/src/services/data_type_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ prisma::data_type::select! {public_datatype {

/// Gets all datatypes
/// * `db` - The prisma client to make the call to
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn get_all_data_types(db: &Database) -> Result<Vec<public_datatype::Data>, QueryError> {
db.data_type()
.find_many(vec![])
Expand All @@ -23,7 +23,7 @@ pub async fn get_all_data_types(db: &Database) -> Result<Vec<public_datatype::Da
/// * `data_type_name` - The data type name to upsert
/// * `unit` - The unit of the data
/// * `node_name` - The name of the node linked to the data type, must already exist!
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn upsert_data_type(
db: &Database,
data_type_name: String,
Expand Down
4 changes: 2 additions & 2 deletions scylla-server-rust/src/services/driver_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ prisma::driver::select! { public_driver{

/// Gets all drivers
/// * `db` - The prisma client to make the call to
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn get_all_drivers(db: &Database) -> Result<Vec<public_driver::Data>, QueryError> {
db.driver()
.find_many(vec![])
Expand All @@ -31,7 +31,7 @@ pub async fn get_all_drivers(db: &Database) -> Result<Vec<public_driver::Data>,
/// * `db` - The prisma client to make the call to
/// * `driver_name` - The name of the driver to upsert
/// * `run_id` - The id of the run to link to the driver, must already exist!
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn upsert_driver(
db: &Database,
driver_name: String,
Expand Down
4 changes: 2 additions & 2 deletions scylla-server-rust/src/services/location_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ prisma::location::select! {public_location{

/// Gets all locations
/// * `db` - The prisma client to make the call to
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn get_all_locations(db: &Database) -> Result<Vec<public_location::Data>, QueryError> {
db.location()
.find_many(vec![])
Expand All @@ -37,7 +37,7 @@ pub async fn get_all_locations(db: &Database) -> Result<Vec<public_location::Dat
/// * `longitude` - The longitude of the location
/// * `radius` - The radius of the locations bounds
/// * `run_id` - The run at the location, must already exist!
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn upsert_location(
db: &Database,
name: String,
Expand Down
4 changes: 2 additions & 2 deletions scylla-server-rust/src/services/node_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ prisma::node::include! {public_node{

/// Gets all nodes
/// * `db` - The prisma client to make the call to
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn get_all_nodes(db: &Database) -> Result<Vec<public_node::Data>, QueryError> {
db.node()
.find_many(vec![])
Expand All @@ -24,7 +24,7 @@ pub async fn get_all_nodes(db: &Database) -> Result<Vec<public_node::Data>, Quer
/// Upserts a node, either creating or updating one depending on its existence
/// * `db` - The prisma client to make the call to
/// * `node_name` - The name of the node linked to the data type
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn upsert_node(
db: &Database,
node_name: String,
Expand Down
8 changes: 4 additions & 4 deletions scylla-server-rust/src/services/run_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ prisma::run::select! {public_run{

/// Gets all runs
/// * `db` - The prisma client to make the call to
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn get_all_runs(db: &Database) -> Result<Vec<public_run::Data>, QueryError> {
db.run()
.find_many(vec![])
Expand All @@ -29,7 +29,7 @@ pub async fn get_all_runs(db: &Database) -> Result<Vec<public_run::Data>, QueryE
/// Gets a single run by its id
/// * `db` - The prisma client to make the call to
/// * `run_id` - The id of the run to search for
/// returns: A result containing the data (or None if the `run_id` was not a valid run) or the QueryError propogated by the db
/// returns: A result containing the data (or None if the `run_id` was not a valid run) or the QueryError propogated by the db
pub async fn get_run_by_id(
db: &Database,
run_id: i32,
Expand All @@ -44,7 +44,7 @@ pub async fn get_run_by_id(
/// Creates a run
/// * `db` - The prisma client to make the call to
/// * `timestamp` - The unix time since epoch in miliseconds when the run starts
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn create_run(db: &Database, timestamp: i64) -> Result<public_run::Data, QueryError> {
db.run()
.create(
Expand All @@ -62,7 +62,7 @@ pub async fn create_run(db: &Database, timestamp: i64) -> Result<public_run::Dat
/// * `db` - The prisma client to make the call to
/// * `timestamp` - The unix time since epoch in miliseconds when the run starts
/// * `run_id` - The id of the run to create, must not already be in use!
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn create_run_with_id(
db: &Database,
timestamp: i64,
Expand Down
4 changes: 2 additions & 2 deletions scylla-server-rust/src/services/system_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ prisma::system::select! {public_system{
/// * `data_type_name` - The data type name to upsert
/// * `unit` - The unit of the data
/// * `node_name` - The name of the node linked to the data type, must already exist!
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn get_all_systems(db: &Database) -> Result<Vec<public_system::Data>, QueryError> {
db.system()
.find_many(vec![])
Expand All @@ -34,7 +34,7 @@ pub async fn get_all_systems(db: &Database) -> Result<Vec<public_system::Data>,
/// * `db` - The prisma client to make the call to
/// * `system_name` - The system name name to upsert
/// * `run_id` - The id of the run to link to the system, must already exist
/// returns: A result containing the data or the QueryError propogated by the db
/// returns: A result containing the data or the QueryError propogated by the db
pub async fn upsert_system(
db: &Database,
system_name: String,
Expand Down

0 comments on commit 51e41c1

Please sign in to comment.