Skip to content

Commit

Permalink
clippy hint cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
calbaker committed Sep 20, 2024
1 parent 5f3243e commit d84d929
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,3 @@ macro_rules! impl_set_body {
}
};
}

#[derive(Debug, Default, Clone)]
pub struct FieldOptions {
/// if true, getters are not generated for a field
pub skip_get: bool,
/// if true, setters are not generated for a field
pub skip_set: bool,
/// if true, current field is itself a struct with `orphaned` field
pub field_has_orphaned: bool,
}
1 change: 1 addition & 0 deletions rust/fastsim-core/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ pub trait SerdeAPI: Serialize + for<'a> Deserialize<'a> {
/// Instantiates an object from a url. Accepts yaml and json file types
/// # Arguments
/// - url: URL (either as a string or url type) to object
///
/// Note: The URL needs to be a URL pointing directly to a file, for example
/// a raw github URL.
fn from_url<S: AsRef<str>>(url: S, skip_init: bool) -> anyhow::Result<Self> {
Expand Down
7 changes: 3 additions & 4 deletions rust/fastsim-core/src/vehicle_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ pub fn abc_to_drag_coeffs(
vehicle: veh,
dyno_func_lb: &dyno_func_lb,
};
let solver =
NelderMead::new(vec![array![0.0, 0.0], array![0.5, 0.0], array![0.5, 0.1]]);
let solver = NelderMead::new(vec![array![0.0, 0.0], array![0.5, 0.0], array![0.5, 0.1]]);
let res = Executor::new(cost, solver)
.configure(|state| state.max_iters(100))
.run()
Expand Down Expand Up @@ -239,8 +238,8 @@ pub struct GitObjectInfo {
pub links: Option<ObjectLinks>,
}

const VEHICLE_REPO_LIST_URL: &'static str =
&"https://api.github.com/repos/NREL/fastsim-vehicles/contents/public";
const VEHICLE_REPO_LIST_URL: &str =
"https://api.github.com/repos/NREL/fastsim-vehicles/contents/public";

/// Function that takes a url and calls the url. If a 503 or 429 error is
/// thrown, it tries again after a pause, up to four times. It returns either a
Expand Down

0 comments on commit d84d929

Please sign in to comment.