75 |
#[must_use]
|
76 |
#[allow(clippy::cast_precision_loss)]
|
77 |
pub fn uri(&self) -> String {
|
194 |
#[must_use]
|
195 |
#[allow(clippy::cast_precision_loss)]
|
196 |
pub fn xmr_requested(&self) -> f64 {
|
210 |
#[must_use]
|
211 |
#[allow(clippy::cast_precision_loss)]
|
212 |
pub fn xmr_paid(&self) -> f64 {
|
409 |
#[allow(clippy::cast_precision_loss)]
|
410 |
fn control_latency(&mut self, opt_timestamp: Option<Instant>) {
|
45 |
// We also allow wraps since we take the sign into account.
|
46 |
#[allow(clippy::cast_precision_loss, clippy::cast_possible_wrap)]
|
47 |
for (i, ®ister_value) in [
|
146 |
#[allow(clippy::cast_precision_loss)]
|
147 |
fn ts_to_millis(&self, ts: u64) -> f32 {
|
213 |
#[allow(clippy::cast_precision_loss)]
|
214 |
pub fn aspect_ratio(&self) -> f32 {
|
32 |
#[allow(clippy::cast_precision_loss)]
|
33 |
impl From<usize> for Units {
|
53 |
#[allow(clippy::cast_precision_loss)]
|
54 |
impl From<u32> for Units {
|
60 |
#[allow(clippy::cast_precision_loss)]
|
61 |
impl From<u64> for Units {
|
81 |
#[allow(clippy::cast_precision_loss)]
|
82 |
impl From<i32> for Units {
|
88 |
#[allow(clippy::cast_precision_loss)]
|
89 |
impl From<i64> for Units {
|
68 |
}
|
69 |
#[allow(clippy::cast_precision_loss)]
|
70 |
scores.push(GeneStorage {
|
3 |
impl Generation {
|
4 |
#[allow(clippy::cast_precision_loss)]
|
5 |
pub fn kill(&self) -> Self {
|
229 |
clippy::cast_sign_loss,
|
230 |
clippy::cast_precision_loss
|
231 |
)]
|
238 |
clippy::cast_sign_loss,
|
239 |
clippy::cast_precision_loss,
|
240 |
clippy::float_cmp
|
83 |
clippy::cast_sign_loss,
|
84 |
clippy::cast_precision_loss,
|
85 |
clippy::cast_lossless
|
94 |
clippy::cast_sign_loss,
|
95 |
clippy::cast_precision_loss
|
96 |
)]
|
102 |
#[allow(clippy::cast_precision_loss, clippy::cast_lossless)]
|
103 |
fn usize_to_f64(a: usize) -> f64 {
|
106 |
}
|
107 |
#[allow(clippy::cast_precision_loss)]
|
108 |
fn u64_to_f64(a: u64) -> f64 {
|
134 |
#[allow(clippy::cast_precision_loss, clippy::cast_possible_truncation)]
|
135 |
impl<T: Tile, E: CoordinateEncoder> TileMap<T, E> {
|
272 |
#[allow(clippy::cast_precision_loss)]
|
273 |
fn create_transform(map_dimensions: &Vector3<u32>, tile_dimensions: &Vector3<u32>) -> Matrix4<f32> {
|
289 |
#[allow(clippy::cast_precision_loss)]
|
290 |
fn to_world(
|
184 |
{
|
185 |
#[allow(clippy::cast_precision_loss)]
|
186 |
fn prepare(
|
416 |
clippy::cast_sign_loss,
|
417 |
clippy::cast_precision_loss,
|
418 |
clippy::similar_names
|
76 |
impl TileArgs {
|
77 |
#[allow(clippy::cast_precision_loss)]
|
78 |
/// Extracts POD vertex data from the provided storages for a tile.
|
288 |
#[allow(clippy::cast_possible_truncation)]
|
289 |
#[allow(clippy::cast_precision_loss)]
|
290 |
#[allow(clippy::cast_sign_loss)]
|
582 |
/// accurate to 10,000 attoseconds.
|
583 |
#[allow(clippy::cast_precision_loss)]
|
584 |
#[must_use]
|
169 |
#[allow(clippy::cast_possible_truncation)]
|
170 |
#[allow(clippy::cast_precision_loss)]
|
171 |
fn mul(self, rhs: f64) -> Self {
|
80 |
#[must_use]
|
81 |
#[allow(clippy::cast_precision_loss)]
|
82 |
pub fn as_julian_day_f64(&self) -> f64 {
|
90 |
#[must_use]
|
91 |
#[allow(clippy::cast_precision_loss)]
|
92 |
pub fn as_julian_day_parts(&self) -> (i64, f64) {
|
312 |
#[allow(clippy::cast_precision_loss)]
|
313 |
let size = byte_size as f64;
|
330 |
if !self.is_unlimited.load(Ordering::Relaxed) {
|
331 |
#[allow(clippy::cast_precision_loss)]
|
332 |
let size = byte_size as f64;
|
111 |
/// Runge-Kutta order 2 method.
|
112 |
#[allow(clippy::cast_precision_loss)]
|
113 |
fn main_iteration_rk2(&mut self) -> Option<Step<T>> {
|
137 |
/// Runge-Kutta order 4 method.
|
138 |
#[allow(clippy::cast_precision_loss, clippy::similar_names)]
|
139 |
fn main_iteration_rk4(&mut self) -> Option<Step<T>> {
|
599 |
/// Radau order 3 with 2 step implicit method.
|
600 |
#[allow(clippy::cast_precision_loss)]
|
601 |
fn main_iteration(&mut self) -> Option<Step<T>> {
|
228 |
#[allow(clippy::cast_precision_loss)]
|
229 |
#[test]
|
118 |
/// Runge-Kutta order 2 method.
|
119 |
#[allow(clippy::cast_precision_loss)]
|
120 |
fn main_iteration_rk2(&mut self) -> Option<Step<T>> {
|
144 |
/// Runge-Kutta order 4 method.
|
145 |
#[allow(clippy::cast_precision_loss, clippy::similar_names)]
|
146 |
fn main_iteration_rk4(&mut self) -> Option<Step<T>> {
|
693 |
/// Radau order 3 with 2 step implicit method.
|
694 |
#[allow(clippy::cast_precision_loss, clippy::similar_names)]
|
695 |
fn main_iteration(&mut self) -> Option<Step<T>> {
|
81 |
/// 1. The value must be less than or equal to the const `EXCESSIVE_VALUE`
|
82 |
#[allow(clippy::cast_precision_loss)]
|
83 |
/// convert u64 into f64
|
154 |
#[allow(clippy::float_cmp, clippy::cast_lossless, clippy::cast_precision_loss)]
|
155 |
fn visit_f64<E: serde::de::Error>(self, v: f64) -> Result<Self::Value, E> {
|
177 |
/// only way to specify a negative number.
|
178 |
#[allow(clippy::cast_precision_loss)]
|
179 |
pub fn value_as_f64<R>(key: &str, lit: &Lit, range: R) -> Result<f64>
|
45 |
) -> usize {
|
46 |
#[allow(clippy::cast_precision_loss)]
|
47 |
let mut x = stream_duration as f64;
|
26 |
#[allow(clippy::cast_precision_loss)]
|
27 |
#[allow(clippy::cast_possible_truncation)]
|
50 |
#[allow(clippy::cast_precision_loss)]
|
51 |
pub fn resample(
|
18 |
#[allow(clippy::cast_sign_loss)]
|
19 |
#[allow(clippy::cast_precision_loss)]
|
20 |
pub fn resample(
|
69 |
#[allow(clippy::cast_sign_loss)]
|
70 |
#[allow(clippy::cast_precision_loss)]
|
71 |
fn resample_f(
|
45 |
#[allow(clippy::cast_possible_truncation)]
|
46 |
#[allow(clippy::cast_precision_loss)]
|
47 |
#[allow(clippy::cast_sign_loss)]
|
7 |
#[allow(clippy::cast_precision_loss)]
|
8 |
const I16_DENOM: f32 = ((i16::MAX as i32) + 1_i32) as f32;
|
17 |
#[allow(clippy::cast_precision_loss)]
|
18 |
const I32_DENOM: f64 = ((i32::MAX as i64) + 1_i64) as f64;
|
28 |
let iter_num_channels_usize: usize = iter.num_channels() as usize;
|
29 |
#[allow(clippy::cast_precision_loss)]
|
30 |
let iter_num_channels_f32: f32 = iter_num_channels_usize as f32;
|
50 |
#[inline]
|
51 |
#[allow(clippy::cast_precision_loss)]
|
52 |
#[allow(clippy::cast_possible_truncation)]
|
119 |
impl AnimationDto {
|
120 |
#[allow(clippy::cast_precision_loss)]
|
121 |
fn default_duration(&self) -> Result<Option<Duration>, InvalidAnimation> {
|
103 |
if frame_rate.is_total_duration {
|
104 |
#[allow(clippy::cast_precision_loss)]
|
105 |
let actual_duration = frame_rate.frame_duration.div_f64(anim.frames.len() as f64);
|
142 |
#[allow(clippy::cast_precision_loss)]
|
143 |
{
|
17 |
) -> BoxedFuture<'a, Result<(), Error>> {
|
18 |
#[allow(clippy::cast_precision_loss)]
|
19 |
Box::pin(async move {
|
17 |
) -> BoxedFuture<'a, Result<(), Error>> {
|
18 |
#[allow(clippy::cast_lossless, clippy::cast_precision_loss)]
|
19 |
Box::pin(async move {
|
30 |
clippy::cast_sign_loss,
|
31 |
clippy::cast_precision_loss,
|
32 |
clippy::cast_possible_truncation,
|
193 |
/// Computes averaged vertex normals from indices, should be called without duplication as it requires shared vertices
|
194 |
#[allow(clippy::cast_precision_loss)]
|
195 |
pub(crate) fn compute_smooth_normals(&self) -> Vec<Vec3> {
|
6 |
#[allow(clippy::cast_precision_loss, clippy::cast_possible_truncation)]
|
7 |
#[must_use]
|
310 |
#[allow(clippy::cast_precision_loss)] // Acceptable precision loss
|
311 |
let pressure = p.map(|p| p as f32 / 256.0);
|
312 |
#[allow(clippy::cast_precision_loss)] // Acceptable precision loss
|
313 |
let humidity = h.map(|h| h as f32 / 1024.0);
|
327 |
#[allow(clippy::cast_precision_loss)] // Acceptable precision loss
|
328 |
let t = t as f32;
|
412 |
#[allow(clippy::cast_precision_loss)] // Acceptable precision loss
|
413 |
let p = p as f32;
|
477 |
#[allow(clippy::cast_precision_loss)] // Acceptable precision loss
|
478 |
let h = h as f32;
|
81 |
/// cannot be done without losing data, an error will be returned.
|
82 |
#[allow(clippy::cast_precision_loss)]
|
83 |
pub fn into_f64(self) -> Result<Option<f64>, Error> {
|
126 |
/// a [`Numeric`](crate::keyvalue::Numeric), an error will be returned.
|
127 |
#[allow(clippy::cast_precision_loss)]
|
128 |
pub fn into_f64_lossy(self) -> Result<Option<f64>, Error> {
|
246 |
/// cannot be done without losing data, an error will be returned.
|
247 |
#[allow(clippy::cast_precision_loss)]
|
248 |
pub async fn into_f64(self) -> Result<Option<f64>, Error> {
|
291 |
/// a [`Numeric`](crate::keyvalue::Numeric), an error will be returned.
|
292 |
#[allow(clippy::cast_precision_loss)]
|
293 |
pub async fn into_f64_lossy(self) -> Result<Option<f64>, Error> {
|
625 |
#[must_use]
|
626 |
#[allow(clippy::cast_precision_loss)]
|
627 |
pub const fn as_f64(&self) -> Option<f64> {
|
651 |
#[must_use]
|
652 |
#[allow(clippy::cast_precision_loss)]
|
653 |
pub const fn as_f64_lossy(&self) -> f64 {
|
398 |
{
|
399 |
#[allow(clippy::cast_precision_loss)]
|
400 |
Ok(Value::Float(a / (n as f64)))
|
403 |
{
|
404 |
#[allow(clippy::cast_precision_loss)]
|
405 |
Ok(Value::Float((n as f64) / a))
|
735 |
#[allow(clippy::cast_precision_loss)]
|
736 |
if *as_percent {
|
910 |
(Value::Float(a), Value::Float(b)) => Ok((a - b).abs() < f64::EPSILON),
|
911 |
#[allow(clippy::cast_precision_loss)]
|
912 |
(Value::Integer(n), Value::Float(a)) | (Value::Float(a), Value::Integer(n)) => {
|
49 |
#[allow(clippy::cast_precision_loss)]
|
50 |
mod math;
|
64 |
#[allow(clippy::many_single_char_names)] // I like my short names for this one
|
65 |
#[allow(clippy::cast_precision_loss)]
|
66 |
#[allow(clippy::cast_possible_truncation)]
|
56 |
#[inline]
|
57 |
#[allow(clippy::cast_precision_loss)]
|
58 |
fn next(&mut self) -> Option<RGB> {
|
111 |
#[inline]
|
112 |
#[allow(clippy::cast_precision_loss)]
|
113 |
fn next(&mut self) -> Option<HSV> {
|
168 |
#[inline]
|
169 |
#[allow(clippy::cast_precision_loss)]
|
170 |
fn next(&mut self) -> Option<RGBA> {
|
217 |
#[inline]
|
218 |
#[allow(clippy::cast_precision_loss)]
|
219 |
fn next(&mut self) -> Option<RGBA> {
|
237 |
/// See `HtmlColorConversionError`
|
238 |
#[allow(clippy::cast_precision_loss)]
|
239 |
pub fn from_hex<S: AsRef<str>>(code: S) -> Result<Self, HtmlColorConversionError> {
|
205 |
/// See `HtmlColorConversionError`
|
206 |
#[allow(clippy::cast_precision_loss)]
|
207 |
pub fn from_hex<S: AsRef<str>>(code: S) -> Result<Self, HtmlColorConversionError> {
|
13 |
impl GameState for State {
|
14 |
#[allow(clippy::cast_precision_loss)]
|
15 |
fn tick(&mut self, ctx: &mut BTerm) {
|
27 |
/// Returns a random double in [0, 1).
|
28 |
#[allow(clippy::cast_precision_loss)] // Messy but we know what we're doing.
|
29 |
pub(crate) fn rand(&mut self) -> f64 {
|
33 |
#[allow(
|
34 |
clippy::cast_precision_loss,
|
35 |
clippy::cast_sign_loss,
|
68 |
#[allow(clippy::cast_precision_loss)]
|
69 |
/// # Float Length.
|
195 |
#[must_use]
|
196 |
#[allow(clippy::cast_precision_loss)]
|
197 |
pub fn numeric_value(&self) -> f64 {
|
31 |
// loss of precision is ok here since we trim down to 2 decimal places
|
32 |
#[allow(clippy::cast_precision_loss)]
|
33 |
let percentage: f32 = (fraction * 100) as f32 / (total) as f32;
|
101 |
#[allow(clippy::cast_possible_truncation)]
|
102 |
#[allow(clippy::cast_precision_loss)]
|
103 |
Ok((value * unit_multiplicator? as f64) as u64)
|
677 |
#[allow(clippy::cast_precision_loss, clippy::cast_possible_truncation)]
|
678 |
let perc: f32 =
|
53 |
#[allow(clippy::cast_sign_loss)]
|
54 |
#[allow(clippy::cast_precision_loss)]
|
55 |
let width = (count as f64).log10().ceil() as usize;
|
88 |
#[allow(
|
89 |
clippy::cast_precision_loss,
|
90 |
clippy::cast_possible_truncation,
|
361 |
pub fn magnitude(self) -> f32 {
|
362 |
#[allow(clippy::cast_precision_loss)]
|
363 |
(self.sq_magnitude() as f32).sqrt()
|
384 |
pub fn to_f32(self) -> Vec2 {
|
385 |
#[allow(clippy::cast_precision_loss)]
|
386 |
Vec2 {
|
343 |
#[allow(clippy::cast_precision_loss)]
|
344 |
#[must_use]
|
548 |
header.set_total_docs(num_documents as i32);
|
549 |
#[allow(clippy::cast_precision_loss)]
|
550 |
header.set_average_doclength(doclen_sum as f64 / f64::from(num_documents));
|
51 |
ALLOCATED.inc_by(size as u64);
|
52 |
#[allow(clippy::cast_precision_loss)]
|
53 |
SIZE.observe(size as f64);
|
104 |
#[allow(clippy::cast_precision_loss)]
|
105 |
REQ_BODY_GAUGE.set(response.body().size_hint().lower() as f64);
|
75 |
fn drop(&mut self) {
|
76 |
#[allow(clippy::cast_precision_loss)]
|
77 |
let duration = self.start.elapsed().as_millis() as f64 / 1000.0;
|
119 |
#[allow(clippy::cast_possible_truncation)] // It fits.
|
120 |
#[allow(clippy::cast_precision_loss)] // It fits.
|
121 |
#[allow(clippy::cast_sign_loss)] // It is positive.
|
59 |
impl From<Number> for f64 {
|
60 |
#[allow(clippy::cast_precision_loss)]
|
61 |
fn from(n: Number) -> Self {
|
98 |
#[allow(clippy::cast_precision_loss)]
|
99 |
fn gen_int_column(dialect: Dialect, rng: &mut dyn RngCore) -> Column {
|
163 |
#[allow(clippy::cast_precision_loss)]
|
164 |
fn gen_decimal_column(_: Dialect, rng: &mut dyn RngCore) -> Column {
|
865 |
clippy::cast_possible_truncation,
|
866 |
clippy::cast_precision_loss,
|
867 |
clippy::cast_sign_loss
|
85 |
clippy::cast_possible_truncation,
|
86 |
clippy::cast_precision_loss
|
87 |
)]
|
426 |
#[cfg(feature = "tauri")]
|
427 |
#[allow(clippy::cast_precision_loss)]
|
428 |
/// It takes a path to a directory containing raw modules, Parse them, and returns a JSON string
|
56 |
}
|
57 |
#[allow(clippy::cast_precision_loss)]
|
58 |
fn step_advance(&mut self) {
|
61 |
#[cfg(feature = "tauri")]
|
62 |
#[allow(clippy::cast_precision_loss)]
|
63 |
/// It takes a path to a directory containing raw modules, parses them, and returns a JSON string
|
740 |
#[allow(
|
741 |
clippy::cast_precision_loss,
|
742 |
clippy::cast_possible_truncation,
|
55 |
// This is sub-optimal for this use case.
|
56 |
#[allow(clippy::cast_precision_loss)]
|
57 |
let i = rng.gen::<u64>() as f64 / 18_446_744_073_709_551_615.0_f64;
|
136 |
clippy::cast_possible_truncation,
|
137 |
clippy::cast_precision_loss,
|
138 |
clippy::cast_sign_loss
|
175 |
}
|
176 |
#[allow(clippy::cast_precision_loss)]
|
177 |
return Some(ProximateWordItem::new((
|
360 |
// We don't care about precision.
|
361 |
#[allow(clippy::cast_precision_loss)]
|
362 |
{
|
476 |
// Don't really care about precision.
|
477 |
#[allow(clippy::cast_precision_loss)]
|
478 |
let rating_decrease = 1.0 / (0.0001 * closest.0 as f32 + 0.025);
|
553 |
// Don't really care about precision.
|
554 |
#[allow(clippy::cast_precision_loss)]
|
555 |
let rating_increase = 0.5 / (0.001 * dist as f32 + 0.1);
|
269 |
#[allow(clippy::cast_precision_loss)]
|
270 |
pub async fn position(&self, conn: &SyncConnection) -> Result<i64> {
|
376 |
#[allow(clippy::cast_precision_loss, clippy::cast_possible_truncation)]
|
377 |
pub async fn try_seek(self, conn: &SyncConnection, to: Offset) -> Result<Option<(Self, f64)>> {
|
42 |
/// Update `StreamingStats` with a new value
|
43 |
#[allow(clippy::cast_precision_loss)]
|
44 |
pub fn update(&mut self, val: f64) {
|
58 |
/// Return the current variance
|
59 |
#[allow(clippy::cast_precision_loss)]
|
60 |
#[must_use]
|
178 |
let n_delims = count(line, delim_char);
|
179 |
#[allow(clippy::cast_precision_loss)]
|
180 |
if (n_delims as f64 - avg_delims).abs() < 1. {
|
124 |
pub fn gas_to_fee(&self, gas: impl Into<Gas> + Clone) -> Result<Fee, ErrorReport> {
|
125 |
#[allow(clippy::cast_precision_loss)]
|
126 |
#[allow(clippy::cast_possible_truncation)]
|
3 |
pub fn mul_gas_float(gas: impl Into<Gas>, f: f64) -> Gas {
|
4 |
#[allow(clippy::cast_precision_loss)]
|
5 |
let gas = gas.into().value() as f64;
|
71 |
}
|
72 |
#[allow(clippy::cast_precision_loss)]
|
73 |
#[inline]
|
140 |
/// Will panic if the system clock is not available
|
141 |
#[allow(clippy::cast_precision_loss)]
|
142 |
#[inline]
|
372 |
#[cfg(feature = "time")]
|
373 |
#[allow(clippy::cast_precision_loss)]
|
374 |
fn as_ts(&self, tf_past: bool) -> EResult<f64> {
|
83 |
}
|
84 |
#[allow(clippy::cast_precision_loss)]
|
85 |
#[inline]
|
140 |
/// Will panic if the system clock is not available
|
141 |
#[allow(clippy::cast_precision_loss)]
|
142 |
pub fn now_ns_float() -> f64 {
|
141 |
#[allow(clippy::cast_possible_truncation)]
|
142 |
#[allow(clippy::cast_precision_loss)]
|
143 |
fn round_to(value: f64, digits: f64) -> EResult<f64> {
|
35 |
if total_full > 0 {
|
36 |
#[allow(clippy::cast_precision_loss)]
|
37 |
Some((total_now as f64) / (total_full as f64))
|
126 |
#[allow(clippy::cast_possible_truncation)]
|
127 |
#[allow(clippy::cast_precision_loss)]
|
128 |
let filled = (battery_usage * (len as f64)).ceil() as usize;
|
162 |
clippy::cast_sign_loss,
|
163 |
clippy::cast_precision_loss
|
164 |
)]
|
107 |
#[allow(clippy::cast_precision_loss)]
|
108 |
pub(crate) fn as_f64(&self) -> f64 {
|
266 |
const NS_IN_S: f64 = 1e9;
|
267 |
#[allow(clippy::cast_precision_loss)]
|
268 |
let whole = timestamp.timestamp() as f64;
|
56 |
.expect("Math.random() didn't return a float");
|
57 |
#[allow(clippy::cast_precision_loss)]
|
58 |
let random = random * ((1u64 << f64::MANTISSA_DIGITS) as f64);
|
12 |
});
|
13 |
#[allow(clippy::cast_precision_loss)]
|
14 |
let millis = (duration.as_micros() as f64) / 1000.0;
|
166 |
#[allow(clippy::cast_precision_loss)]
|
167 |
/// Print directory information with inode size from metadata and approximate directory entry
|
69 |
#[allow(clippy::cast_precision_loss)]
|
70 |
pub fn calc_efficiency_bound(instance: &Instance) -> (EfficiencyBound, Vec<EfficiencyBound>) {
|
43 |
let level = ramp.len();
|
44 |
#[allow(clippy::cast_precision_loss)] // max level is 70, small enough
|
45 |
let multiplier = (level as f64) / (f64::from(u8::max_value()) + 1.0);
|
31 |
let pair_count = MOON_CHARS.len();
|
32 |
#[allow(clippy::cast_precision_loss)] // MOON_CHARS's length is small enough
|
33 |
let multiplier = pair_count as f64 / 256.0;
|
50 |
impl<'a> RenderResultPoints<'a> {
|
51 |
#[allow(clippy::cast_precision_loss)] // render result size is small enough to cast to f64
|
52 |
fn new(chars: &'a RenderResult, width: f64, height: f64) -> Self {
|
82 |
// so we need do some math to flip it and add padding
|
83 |
#[allow(clippy::cast_precision_loss)] // render result size is small enough
|
84 |
let result = (self.x as f64 + self.h_pad, self.height - self.y as f64 - self.v_pad);
|
90 |
#[must_use]
|
91 |
#[allow(clippy::cast_precision_loss)]
|
92 |
pub fn percent(number: usize, total: usize) -> f32 {
|
63 |
/// $$$
|
64 |
#[allow(clippy::cast_precision_loss)]
|
65 |
fn chebyshev_nodes_2nd_kind(n: usize) -> Vec<A> {
|
86 |
#[must_use]
|
87 |
#[allow(clippy::cast_precision_loss)]
|
88 |
pub fn _dmat(n: usize, deriv: usize) -> Array2<A> {
|
155 |
#[must_use]
|
156 |
#[allow(clippy::cast_precision_loss)]
|
157 |
pub fn _pinv(n: usize, deriv: usize) -> Array2<A> {
|
149 |
/// J. Shen: Effcient Spectral-Galerkin Method II.
|
150 |
#[allow(clippy::cast_precision_loss)]
|
151 |
pub fn new(n: usize) -> Self {
|
225 |
/// J. Shen: Effcient Spectral-Galerkin Method II.
|
226 |
#[allow(clippy::cast_precision_loss)]
|
227 |
pub fn new(n: usize) -> Self {
|
309 |
/// ```
|
310 |
#[allow(clippy::cast_precision_loss)]
|
311 |
pub fn new(n: usize) -> Self {
|
388 |
/// ```
|
389 |
#[allow(clippy::cast_precision_loss)]
|
390 |
pub fn new(n: usize) -> Self {
|
46 |
#[must_use]
|
47 |
#[allow(clippy::cast_precision_loss)]
|
48 |
pub fn nodes(n: usize) -> Vec<A> {
|
59 |
#[must_use]
|
60 |
#[allow(clippy::cast_precision_loss)]
|
61 |
pub fn wavenumber(n: usize) -> Vec<Complex<A>> {
|
47 |
#[must_use]
|
48 |
#[allow(clippy::cast_precision_loss)]
|
49 |
pub fn nodes(n: usize) -> Vec<A> {
|
10 |
// We must allow losing precision here.
|
11 |
#[allow(clippy::cast_precision_loss)]
|
12 |
let scale = f64::min(20.0 / canvas_size.0 as f64, 20.0 / canvas_size.1 as f64);
|
18 |
Rendered::Point(pt) => {
|
19 |
#[allow(clippy::cast_precision_loss)]
|
20 |
let p = Complex::new(
|
35 |
Rendered::Line(ln) => {
|
36 |
#[allow(clippy::cast_precision_loss)]
|
37 |
let p1 = Complex::new(
|
40 |
);
|
41 |
#[allow(clippy::cast_precision_loss)]
|
42 |
let p2 = Complex::new(
|
243 |
let (points, logger) = self.receiver.recv().unwrap();
|
244 |
#[allow(clippy::cast_precision_loss)]
|
245 |
let total_quality =
|
267 |
fn bake_magnitudes(&self, maximum_adjustment: f64) -> Vec<f64> {
|
268 |
#[allow(clippy::cast_precision_loss)]
|
269 |
let step = maximum_adjustment / self.workers.len() as f64;
|
312 |
#[allow(clippy::cast_precision_loss)]
|
313 |
let mean_count_f = mean_count as f64;
|
68 |
#[allow(clippy::cast_precision_loss)]
|
69 |
let width = figure.canvas_size.0 as f64;
|
70 |
#[allow(clippy::cast_precision_loss)]
|
71 |
let height = figure.canvas_size.1 as f64;
|
98 |
#[allow(clippy::cast_precision_loss)]
|
99 |
if a < 0f64 {
|
124 |
#[allow(
|
125 |
clippy::cast_precision_loss,
|
126 |
clippy::cast_possible_truncation,
|
3 |
impl Generation {
|
4 |
#[allow(clippy::cast_precision_loss)]
|
5 |
pub fn kill(&self) -> Self {
|
275 |
assert!(count <= 1 << f64::MANTISSA_DIGITS);
|
276 |
#[allow(clippy::cast_precision_loss)]
|
277 |
(0..count).map(move |i| {
|
50 |
#[allow(clippy::cast_possible_truncation)]
|
51 |
#[allow(clippy::cast_precision_loss)]
|
52 |
#[allow(clippy::cast_sign_loss)]
|
51 |
#[allow(clippy::cast_possible_truncation)]
|
52 |
#[allow(clippy::cast_precision_loss)]
|
53 |
#[allow(clippy::cast_sign_loss)]
|
313 |
#[cfg(dim2)]
|
314 |
#[allow(clippy::cast_precision_loss)]
|
315 |
fn heightfield_builder(size: Vec2, heights: &[Vec<f32>]) -> ColliderBuilder {
|
324 |
#[cfg(dim3)]
|
325 |
#[allow(clippy::cast_precision_loss)]
|
326 |
fn heightfield_builder(size: Vec2, heights: &[Vec<f32>]) -> ColliderBuilder {
|
315 |
#[allow(clippy::cast_precision_loss)]
|
316 |
/// Computes all coordinates in a line from `self` to `other`.
|
17 |
impl HexLayout {
|
18 |
#[allow(clippy::cast_precision_loss)]
|
19 |
#[must_use]
|
30 |
#[allow(clippy::cast_precision_loss, clippy::cast_possible_truncation)]
|
31 |
#[must_use]
|
42 |
#[allow(clippy::cast_precision_loss)]
|
43 |
#[must_use]
|
301 |
// Rounding is fine when the numbers get to large to fit f64
|
302 |
#[allow(clippy::cast_precision_loss)]
|
303 |
{
|
320 |
// If the counts get to big rounding is fine here.
|
321 |
#[allow(clippy::cast_precision_loss)]
|
322 |
{
|
168 |
std::iter::successors(Some(0.), |width| Some(width + column_width));
|
169 |
#[allow(clippy::cast_precision_loss)] // TODO: possible precision loss
|
170 |
let grid_width = (columns as f32) * column_width;
|
76 |
#[allow(clippy::cast_precision_loss)]
|
77 |
let intrinsic = Size::new(
|
339 |
let line_spacing = f32::from(self.line_spacing);
|
340 |
#[allow(clippy::cast_precision_loss)] // TODO: possible precision loss
|
341 |
let line_minimal_length = self.line_minimal_length as f32;
|
421 |
let line_spacing = f32::from(self.line_spacing);
|
422 |
#[allow(clippy::cast_precision_loss)] // TODO: possible precision loss
|
423 |
let line_minimal_length = self.line_minimal_length as f32;
|
154 |
#[allow(clippy::cast_possible_truncation)]
|
155 |
#[allow(clippy::cast_precision_loss)]
|
156 |
fn mul_assign(&mut self, factor: f32) {
|
163 |
#[allow(clippy::cast_possible_truncation)]
|
164 |
#[allow(clippy::cast_precision_loss)]
|
165 |
fn mul_assign(&mut self, factor: f64) {
|
172 |
#[allow(clippy::cast_possible_truncation)]
|
173 |
#[allow(clippy::cast_precision_loss)]
|
174 |
fn div_assign(&mut self, factor: f64) {
|
64 |
#[allow(clippy::cast_possible_truncation)]
|
65 |
#[allow(clippy::cast_precision_loss)]
|
66 |
Self::from(point.x() as f32, point.y() as f32)
|
76 |
#[allow(clippy::cast_possible_truncation)]
|
77 |
#[allow(clippy::cast_precision_loss)]
|
78 |
Self::from(point.x() as f32, point.y() as f32, 0.0)
|
72 |
#[allow(clippy::cast_possible_truncation)]
|
73 |
#[allow(clippy::cast_precision_loss)]
|
74 |
Self::from(point.x() as f32, point.y() as f32, 0.0, 0.0)
|
242 |
let time = before.elapsed();
|
243 |
#[allow(clippy::cast_precision_loss)]
|
244 |
let bytes_per_second = bytes_uploaded as f64 / time.as_secs_f64();
|
38 |
impl CpuParams {
|
39 |
#[allow(clippy::cast_precision_loss)] // The loss of precision is acceptable
|
40 |
fn new(params: &Params) -> Self {
|
51 |
#[allow(clippy::cast_precision_loss)] // The loss of precision is acceptable
|
52 |
fn map_pixel(self, pixel_row: u32, pixel_col: u32) -> Complex32 {
|
256 |
))]
|
257 |
#[allow(clippy::cast_precision_loss)] // loss of precision is acceptable
|
258 |
pub(crate) fn view_width(&self) -> f32 {
|
133 |
#[allow(
|
134 |
clippy::cast_precision_loss,
|
135 |
clippy::cast_possible_truncation,
|
260 |
clippy::cast_possible_truncation,
|
261 |
clippy::cast_precision_loss,
|
262 |
clippy::cast_sign_loss
|
141 |
/// Get the calculated executions per second for this client
|
142 |
#[allow(clippy::cast_precision_loss, clippy::cast_sign_loss)]
|
143 |
#[cfg(feature = "afl_exec_sec")]
|
172 |
/// Get the calculated executions per second for this client
|
173 |
#[allow(clippy::cast_precision_loss, clippy::cast_sign_loss)]
|
174 |
#[cfg(not(feature = "afl_exec_sec"))]
|
872 |
impl core::fmt::Display for ClientPerfMonitor {
|
873 |
#[allow(clippy::cast_precision_loss)]
|
874 |
fn fmt(&self, f: &mut core::fmt::Formatter) -> Result<(), core::fmt::Error> {
|
165 |
println!("{key}: {val}");
|
166 |
#[allow(clippy::cast_precision_loss)]
|
167 |
let value: f64 = match val {
|
103 |
impl PerfTuiContext {
|
104 |
#[allow(clippy::cast_precision_loss)]
|
105 |
pub fn grab_data(&mut self, m: &ClientPerfMonitor) {
|
194 |
#[allow(clippy::too_many_lines, clippy::cast_precision_loss)]
|
195 |
fn draw_time_chart<B>(
|
182 |
/// initialize pso
|
183 |
#[allow(clippy::cast_precision_loss)]
|
184 |
pub fn pso_initialize(&mut self) -> Result<(), Error> {
|
242 |
/// See <https://github.com/puppet-meteor/MOpt-AFL/blob/master/MOpt/afl-fuzz.c#L10623>
|
243 |
#[allow(clippy::cast_precision_loss)]
|
244 |
pub fn pso_update(&mut self) -> Result<(), Error> {
|
312 |
/// see <https://github.com/puppet-meteor/MOpt-AFL/blob/master/MOpt/afl-fuzz.c#L397>
|
313 |
#[allow(clippy::cast_precision_loss)]
|
314 |
pub fn select_algorithm(&mut self) -> Result<MutationId, Error> {
|
406 |
#[allow(clippy::cast_precision_loss)]
|
407 |
fn post_exec(
|
182 |
// then will only result in a less precise figure, so is not an issue.
|
183 |
#[allow(clippy::cast_precision_loss)]
|
184 |
let size_in_mb = size_in_bytes as f64 / (1024.0 * 1024.0);
|
16 |
#[allow(clippy::cast_precision_loss)]
|
17 |
fn as_mebibytes(val: usize) -> f64 {
|
183 |
#[allow(clippy::cast_precision_loss)]
|
184 |
pub fn to_suffix_repr(size: u128) -> String {
|
80 |
});
|
81 |
#[allow(clippy::cast_precision_loss)]
|
82 |
let plugin_instance = unsafe {
|
97 |
/// number or integer, and not a string that could be parsed as one.
|
98 |
#[allow(clippy::cast_precision_loss)]
|
99 |
pub fn value_as_num(nv: &MetaNameValue) -> Result<f64> {
|
51 |
#[allow(clippy::cast_possible_truncation)]
|
52 |
#[allow(clippy::cast_precision_loss)]
|
53 |
let mask_from = if text.len() > min_chars {
|
12 |
pub fn least_squares(f: Function, params: &[f64], vars: &[Vec<f64>], y: &[f64]) -> f64 {
|
13 |
#[allow(clippy::cast_precision_loss)]
|
14 |
vars.iter()
|
26 |
) -> f64 {
|
27 |
#[allow(clippy::cast_precision_loss)]
|
28 |
vars.iter()
|
361 |
/// [Algorithm-MOS]: https://tinyurl.com/y3nojmot
|
362 |
#[allow(clippy::cast_precision_loss)]
|
363 |
fn calculate(&mut self) -> Option<ConnectionQualityScore> {
|
462 |
} else {
|
463 |
#[allow(clippy::cast_precision_loss)]
|
464 |
Some((sum_lost_delta as f64 * 100.) / sum_sent_delta as f64)
|
1513 |
impl From<SystemTime> for HighResTimeStamp {
|
1514 |
#[allow(clippy::cast_precision_loss)]
|
1515 |
#[inline]
|
45 |
impl Fitness<EvolveHelloWorld> for EvolvedString {
|
46 |
#[allow(clippy::cast_precision_loss, clippy::float_arithmetic)]
|
47 |
fn fitness(&self, environment: &EvolveHelloWorld) -> f64 {
|
639 |
.map(|species| {
|
640 |
#[allow(clippy::cast_precision_loss, clippy::as_conversions)]
|
641 |
let species_size = species.population.members.len() as f64;
|
803 |
#[allow(
|
804 |
clippy::cast_precision_loss,
|
805 |
clippy::float_arithmetic,
|
1316 |
impl FitnessTrait<TestEnvironment> for TestPhenotype {
|
1317 |
#[allow(clippy::cast_precision_loss, clippy::float_arithmetic)]
|
1318 |
fn fitness(&self, environment: &TestEnvironment) -> f64 {
|
22 |
/// For arrays of the same size we can simply use the hamming distance.
|
23 |
#[allow(clippy::cast_precision_loss, clippy::float_arithmetic, clippy::as_conversions)]
|
24 |
fn distance(&self, other: &Self) -> f32 {
|
12 |
impl Distance for String {
|
13 |
#[allow(clippy::float_arithmetic, clippy::cast_precision_loss)]
|
14 |
// this algorithm should be fine as it is
|
24 |
/// genes the same distance as differing ones.
|
25 |
#[allow(clippy::float_arithmetic, clippy::cast_precision_loss)]
|
26 |
fn distance(&self, other: &Self) -> f32 {
|
10 |
// state of this crate.
|
11 |
#[allow(clippy::cast_precision_loss)]
|
12 |
#[allow(clippy::float_arithmetic)]
|
75 |
// using `as` this liberal is pretty bad, but I don't have time right now, will enhance later
|
76 |
#[allow(clippy::cast_precision_loss, clippy::float_arithmetic)]
|
77 |
// this is fine as the original value converted to f64 was positive anyway
|
611 |
// Pages can safely become float
|
612 |
#[allow(clippy::cast_precision_loss)]
|
613 |
let pages = res.0 as f32;
|
619 |
// fine.
|
620 |
#[allow(clippy::cast_precision_loss)]
|
621 |
let freepages = res.0 as f32;
|
626 |
// If pagesize either changes, or is a bit number, we have other problems.
|
627 |
#[allow(clippy::cast_precision_loss)]
|
628 |
let pagesize: f32 = res.0 as f32;
|
156 |
// The precision loss is ok here as we are working with 32bit timestamps up-scaled to 64bit
|
157 |
#[allow(clippy::cast_precision_loss)]
|
158 |
let when = args.when as f64;
|
110 |
#[allow(clippy::cast_sign_loss)]
|
111 |
#[allow(clippy::cast_precision_loss)]
|
112 |
pub fn bilinear<V, P, Container, O>(img: &ImageBuffer<P, Container>, x: f32, y: f32) -> Option<O>
|
20 |
{
|
21 |
#[allow(clippy::cast_precision_loss)]
|
22 |
let count = Constant::new(arrayfire::constant!((B*L*R*C) as f32; 1,1,1,1));
|
272 |
// but it's not relevant here
|
273 |
#[allow(clippy::cast_precision_loss)]
|
274 |
// casting the rounded square root from `f64` to `usize` is safe
|
318 |
// but it's not relevant here
|
319 |
#[allow(clippy::cast_precision_loss)]
|
320 |
// casting the rounded cube root from `f64` to `usize` is safe
|
364 |
// but it's not relevant here
|
365 |
#[allow(clippy::cast_precision_loss)]
|
366 |
// casting the rounded base-2 log from `f64` to `usize` is safe
|
440 |
// but it's not relevant here
|
441 |
#[allow(clippy::cast_precision_loss)]
|
442 |
let denominator = (n_bins as f64).powf(1. / 3.);
|
232 |
#[allow(clippy::cast_precision_loss)]
|
233 |
fn ifft_lane(&self, data: &[Complex<T>], out: &mut [Complex<T>]) {
|
424 |
#[allow(clippy::cast_precision_loss)]
|
425 |
fn ifft_r2c_lane(&self, data: &[Complex<T>], out: &mut [T]) {
|
625 |
#[allow(
|
626 |
clippy::cast_precision_loss,
|
627 |
clippy::cast_possible_truncation,
|
1650 |
#[allow(
|
1651 |
clippy::cast_precision_loss,
|
1652 |
clippy::cast_possible_truncation,
|
431 |
#[allow(clippy::cast_precision_loss)]
|
432 |
#[allow(clippy::cast_lossless)]
|
57 |
let rate = full_size - current_size;
|
58 |
#[allow(clippy::cast_precision_loss)]
|
59 |
let normalized_rate = rate as f64 / (full_size - 1) as f64;
|
382 |
#[allow(clippy::cast_precision_loss)]
|
383 |
// Max is the most trivial, but also most ineffective strategy.
|
136 |
#[allow(clippy::cast_precision_loss)]
|
137 |
let priority = no_solved as f64 + row_rate + column_rate;
|
196 |
// maximum sleep time is half a trillion years.
|
197 |
#[allow(clippy::cast_precision_loss)] // Handled by subtracting 4096 as described.
|
198 |
Duration::from_secs_f64(delta.into_inner().clamp(0.0, (u64::MAX - 4096) as f64))
|
101 |
/// - Panics if the converted value is outside the `i32` bounds.
|
102 |
#[allow(clippy::cast_precision_loss, clippy::cast_possible_truncation)]
|
103 |
// ^-- precision loss is OK in general, and we perform `i32` range check before
|
47 |
#[allow(clippy::cast_precision_loss)] // There is no loss, since `i` values are small
|
48 |
fn create_signal(width: usize, height: usize) -> Array4<f32> {
|
90 |
#[test]
|
91 |
#[allow(clippy::cast_precision_loss)]
|
92 |
fn f32_convolution_with_filters() -> Result<(), Error> {
|
320 |
#[test]
|
321 |
#[allow(clippy::cast_precision_loss)]
|
322 |
fn with_several_input_channels() -> Result<(), Error> {
|
847 |
#[allow(clippy::cast_possible_truncation, clippy::cast_precision_loss)]
|
848 |
fn expression_evaluator(
|
2279 |
clippy::cast_possible_truncation,
|
2280 |
clippy::cast_precision_loss
|
2281 |
)]
|
2549 |
#[allow(clippy::cast_precision_loss)]
|
2550 |
fn partial_cmp_literals(
|
2806 |
impl NumericBinaryOperands {
|
2807 |
#[allow(clippy::cast_precision_loss)]
|
2808 |
fn new(a: EncodedTerm, b: EncodedTerm) -> Option<Self> {
|
336 |
#[allow(clippy::cast_precision_loss)]
|
337 |
impl Stats for ByteStats {
|
508 |
/// Convert cpu stats into a vec for the charts function
|
509 |
#[allow(clippy::cast_precision_loss)]
|
510 |
fn get_cpu_dataset(&self) -> Vec<(f64, f64)> {
|
518 |
/// Convert mem stats into a Vec for the charts function
|
519 |
#[allow(clippy::cast_precision_loss)]
|
520 |
fn get_mem_dataset(&self) -> Vec<(f64, f64)> {
|
65 |
/// Use docker stats to caluclate current cpu usage
|
66 |
#[allow(clippy::cast_precision_loss)]
|
67 |
fn calculate_usage(stats: &Stats) -> f64 {
|
17 |
clippy::cast_possible_truncation,
|
18 |
clippy::cast_precision_loss,
|
19 |
clippy::cast_sign_loss
|
148 |
clippy::cast_sign_loss,
|
149 |
clippy::cast_precision_loss,
|
150 |
clippy::cast_possible_truncation
|
573 |
#[allow(
|
574 |
clippy::cast_precision_loss,
|
575 |
clippy::cast_possible_truncation,
|
599 |
#[allow(
|
600 |
clippy::cast_precision_loss,
|
601 |
clippy::cast_possible_truncation,
|
277 |
));
|
278 |
#[allow(clippy::cast_precision_loss)]
|
279 |
let factors = [
|
311 |
}
|
312 |
#[allow(clippy::unwrap_used, clippy::cast_precision_loss)]
|
313 |
if let Some(index) = blank {
|
448 |
/// Panics if any row in `points` is not contiguous in memory.
|
449 |
#[allow(clippy::cast_precision_loss)] // The precision provided by 54-bit-wide mantissa is
|
450 |
// good enough in computing mean.
|
358 |
.with_inner_size(
|
359 |
#[allow(clippy::cast_precision_loss)]
|
360 |
{
|
328 |
impl<G: ConsoleGame> GameWrapper<G> {
|
329 |
#[allow(clippy::cast_precision_loss)]
|
330 |
fn new_with_options(
|
365 |
#[allow(
|
366 |
clippy::cast_precision_loss,
|
367 |
clippy::too_many_lines,
|
227 |
#[allow(clippy::cast_precision_loss)]
|
228 |
#[test]
|
838 |
/// Converts this integer to an f32, but only if it can be done without losing precision.
|
839 |
#[allow(clippy::cast_precision_loss)]
|
840 |
pub fn as_f32(&self) -> Result<f32, Error> {
|
849 |
/// Converts this integer to an f64, but only if it can be done without losing precision.
|
850 |
#[allow(clippy::cast_precision_loss)]
|
851 |
pub fn as_f64(&self) -> Result<f64, Error> {
|
860 |
/// Converts this integer to an f64, but only if it can be done without losing precision.
|
861 |
#[allow(clippy::cast_precision_loss)]
|
862 |
pub fn as_float(&self) -> Result<Float, Error> {
|
573 |
#[allow(clippy::cast_precision_loss)]
|
574 |
async fn launch_data_stream(mut stream: SStream, timeout: Duration) -> Result<(), Error> {
|
834 |
#[allow(clippy::float_cmp, clippy::cast_precision_loss)]
|
835 |
#[test]
|
453 |
#[allow(clippy::float_cmp, clippy::cast_precision_loss)]
|
454 |
#[test]
|
76 |
let sampled = if let Some(mut idx) = rconfig.indexed()? {
|
77 |
#[allow(clippy::cast_precision_loss)]
|
78 |
if sample_size < 1.0 {
|
90 |
debug!("no index");
|
91 |
#[allow(clippy::cast_precision_loss)]
|
92 |
if sample_size < 1.0 {
|
102 |
// its a percentage, get the actual sample size
|
103 |
#[allow(clippy::cast_precision_loss)]
|
104 |
if sample_size < 1.0 {
|
213 |
(Int(i1), Int(i2)) => i1.cmp(&i2),
|
214 |
#[allow(clippy::cast_precision_loss)]
|
215 |
(Int(i1), Float(f2)) => compare_float(i1 as f64, f2),
|
216 |
#[allow(clippy::cast_precision_loss)]
|
217 |
(Float(f1), Int(i2)) => compare_float(f1, i2 as f64),
|
635 |
// millisecond precision.
|
636 |
#[allow(clippy::cast_precision_loss)]
|
637 |
let n = ts_val as f64;
|
758 |
// (div by 1) so we don't panic.
|
759 |
#[allow(clippy::cast_precision_loss)]
|
760 |
let sparsity: f64 = self.nullcount as f64 / *RECORD_COUNT.get().unwrap_or(&1) as f64;
|
1107 |
}
|
1108 |
#[allow(clippy::cast_precision_loss)]
|
1109 |
match typ {
|
1158 |
fn merge(&mut self, other: TypedSum) {
|
1159 |
#[allow(clippy::cast_precision_loss)]
|
1160 |
match (self.float, other.float) {
|
1208 |
self.integers.add(n);
|
1209 |
#[allow(clippy::cast_precision_loss)]
|
1210 |
self.floats.add(n as f64);
|
178 |
// also, be careful with `i as f64`. this is fine because 0..=6 can all be represented by f64
|
179 |
#[allow(clippy::cast_precision_loss)]
|
180 |
let sum = (1..=5)
|
278 |
#[cfg(not(feature = "f32_float"))]
|
279 |
#[allow(clippy::cast_precision_loss)]
|
280 |
pub mod basic_arithmetic {
|
95 |
#[cfg(not(feature = "no_float"))]
|
96 |
#[allow(clippy::cast_precision_loss)]
|
97 |
#[export_module]
|
151 |
#[cfg(not(feature = "no_float"))]
|
152 |
#[allow(clippy::cast_precision_loss)]
|
153 |
#[export_module]
|
312 |
pub fn f32_to_int(x: f32) -> RhaiResultOf<INT> {
|
313 |
#[allow(clippy::cast_precision_loss)]
|
314 |
if cfg!(not(feature = "unchecked")) && (x > (INT::MAX as f32) || x < (INT::MIN as f32)) {
|
325 |
pub fn f64_to_int(x: f64) -> RhaiResultOf<INT> {
|
326 |
#[allow(clippy::cast_precision_loss)]
|
327 |
if cfg!(not(feature = "unchecked")) && (x > (INT::MAX as f64) || x < (INT::MIN as f64)) {
|
219 |
#[allow(clippy::cast_precision_loss, clippy::cast_possible_wrap)]
|
220 |
impl<F: IntoFill> Line<F> {
|
562 |
#[allow(clippy::cast_precision_loss, clippy::cast_possible_wrap)]
|
563 |
impl<F: IntoFill> Polygon<F> {
|
1211 |
// Used when there is no border
|
1212 |
#[allow(clippy::cast_possible_wrap, clippy::cast_precision_loss)]
|
1213 |
fn rasterize_filled_ellipse(&self, image: &mut Image<F::Pixel>) {
|
1332 |
// Standard, slower brute force algorithm that iterates through all pixels
|
1333 |
#[allow(clippy::cast_possible_wrap, clippy::cast_precision_loss)]
|
1334 |
fn render_ellipse(&self, image: &mut Image<F::Pixel>) {
|
152 |
#[allow(clippy::cast_lossless, clippy::cast_precision_loss)]
|
153 |
fn encode_sequence<P: Pixel>(
|
645 |
#[allow(clippy::cast_precision_loss)]
|
646 |
fn visit_i64<E: Error>(self, v: i64) -> Result<Self::Value, E> {
|
650 |
#[allow(clippy::cast_precision_loss)]
|
651 |
fn visit_u64<E: Error>(self, v: u64) -> Result<Self::Value, E> {
|
22 |
#[allow(clippy::cast_precision_loss)]
|
23 |
pub(crate) fn clock() -> f64 {
|
433 |
}
|
434 |
#[allow(clippy::cast_precision_loss)] // BITS is small-ish
|
435 |
let modulus = (Self::BITS as f64).exp2();
|
613 |
/// Returns `f32::INFINITY` if the value is too large to represent.
|
614 |
#[allow(clippy::cast_precision_loss)] // Documented
|
615 |
fn from(value: &Uint<BITS, LIMBS>) -> Self {
|
630 |
/// Returns `f64::INFINITY` if the value is too large to represent.
|
631 |
#[allow(clippy::cast_precision_loss)] // Documented
|
632 |
fn from(value: &Uint<BITS, LIMBS>) -> Self {
|
41 |
// Find approximate result
|
42 |
#[allow(clippy::cast_precision_loss)] // Casting base to `f64` is fine.
|
43 |
let result = self.approx_log2() / base.approx_log2();
|
106 |
#[must_use]
|
107 |
#[allow(clippy::cast_precision_loss)]
|
108 |
pub fn approx_log2(self) -> f64 {
|
117 |
// FEATURE: Round negative to zero.
|
118 |
#[allow(clippy::cast_precision_loss)] // Self::BITS ~< 2^52 and so fits f64.
|
119 |
if exp < LN2_1P5 {
|
124 |
}
|
125 |
#[allow(clippy::cast_precision_loss)]
|
126 |
if exp > Self::BITS as f64 {
|
46 |
// Root should be less than the value, so approx_pow2 should always succeed.
|
47 |
#[allow(clippy::cast_precision_loss)] // Approximation is good enough.
|
48 |
#[allow(clippy::cast_sign_loss)] // Result should be positive.
|
155 |
if let Some(length) = file_info.length {
|
156 |
#[allow(clippy::cast_precision_loss)]
|
157 |
file_sizes.observe(length as f64);
|
11 |
pub fn least_squares(f: Function, params: &[f64], vars: &[Vec<f64>], y: &[f64]) -> f64 {
|
12 |
#[allow(clippy::cast_precision_loss)]
|
13 |
vars.iter()
|
25 |
) -> f64 {
|
26 |
#[allow(clippy::cast_precision_loss)]
|
27 |
vars.iter()
|
19 |
#[allow(clippy::cast_precision_loss)]
|
20 |
pub(crate) fn clock() -> u64 {
|
77 |
clippy::cast_possible_wrap,
|
78 |
clippy::cast_precision_loss,
|
79 |
clippy::too_many_lines
|
357 |
clippy::cast_sign_loss,
|
358 |
clippy::cast_precision_loss,
|
359 |
clippy::cast_possible_wrap,
|
277 |
clippy::cast_possible_truncation,
|
278 |
clippy::cast_precision_loss,
|
279 |
clippy::cast_possible_wrap
|
249 |
#[cfg_attr(not(feature = "no-inline"), inline(always))]
|
250 |
#[allow(clippy::cast_possible_wrap, clippy::cast_precision_loss)]
|
251 |
fn parse_double(&mut self) -> Result<f64> {
|
678 |
#[test]
|
679 |
#[allow(clippy::cast_precision_loss)]
|
680 |
fn floats() {
|
270 |
#[must_use]
|
271 |
#[allow(clippy::cast_precision_loss)]
|
272 |
fn cast_f64(&self) -> Option<f64> {
|
209 |
#[must_use]
|
210 |
#[allow(clippy::cast_precision_loss)]
|
211 |
fn cast_f64(&self) -> Option<f64> {
|
23 |
#[allow(clippy::cast_precision_loss)]
|
24 |
pub(crate) fn clock() -> u64 {
|
1384 |
/// by the logical size.
|
1385 |
#[allow(clippy::cast_precision_loss)]
|
1386 |
#[allow(clippy::float_arithmetic)]
|
98 |
#[allow(clippy::cast_precision_loss)]
|
99 |
fn percentage(total: u64, accessed: u64, modified: u64) -> (f64, f64) {
|
52 |
// of no concern for the correctness of the value.
|
53 |
#[allow(clippy::cast_precision_loss)]
|
54 |
let lg = f64::log2(raw_size as f64);
|
183 |
#[allow(clippy::cast_precision_loss)]
|
184 |
pub fn to_suffix_repr(size: u128) -> String {
|
70 |
clippy::cast_sign_loss,
|
71 |
clippy::cast_precision_loss,
|
72 |
clippy::cast_lossless
|
81 |
clippy::cast_sign_loss,
|
82 |
clippy::cast_precision_loss
|
83 |
)]
|
89 |
#[allow(clippy::cast_precision_loss, clippy::cast_lossless)]
|
90 |
fn usize_to_f64(a: usize) -> f64 {
|
93 |
}
|
94 |
#[allow(clippy::cast_precision_loss)]
|
95 |
fn u64_to_f64(a: u64) -> f64 {
|
27 |
/// [`jaccard`]: crate::algorithms::jaccard
|
28 |
#[allow(clippy::cast_precision_loss)]
|
29 |
#[inline]
|
282 |
let iter = column.primitive_iter::<Int64Type>(rows).unwrap();
|
283 |
#[allow(clippy::cast_precision_loss)] // 52-bit precision is good enough
|
284 |
let f_values: Vec<f64> = iter.map(|v: i64| v as f64).collect();
|
676 |
#[allow(clippy::cast_precision_loss)] // Cannot happen
|
677 |
let angle_increment: f64 = angle_extent / num_segments as f64;
|
685 |
for i in 0..num_segments {
|
686 |
#[allow(clippy::cast_precision_loss)] // Cannot happen
|
687 |
let mut angle = angle_start + i as f64 * angle_increment;
|
114 |
#[cfg(feature = "generation")]
|
115 |
#[allow(clippy::cast_possible_truncation, clippy::cast_sign_loss, clippy::cast_precision_loss)]
|
116 |
pub fn populate(&mut self, mine_percentage: f64, safe_spot: Option<FieldCoordinates>) {
|
58 |
#[allow(clippy::cast_possible_truncation)]
|
59 |
#[allow(clippy::cast_precision_loss)]
|
60 |
#[allow(clippy::too_many_lines)]
|
11 |
/// Tries to convert an `f64` number to `i64` without precision loss.
|
12 |
#[allow(clippy::cast_possible_truncation, clippy::cast_precision_loss)]
|
13 |
fn to_i64(value: f64) -> Option<i64> {
|
195 |
#[allow(clippy::cast_precision_loss)]
|
196 |
#[allow(clippy::cast_possible_wrap)]
|
69 |
clippy::cast_possible_truncation,
|
70 |
clippy::cast_precision_loss
|
71 |
)]
|
144 |
#[allow(clippy::cast_precision_loss)]
|
145 |
impl Sample for f32 {
|
5 |
unused,
|
6 |
clippy::cast_precision_loss,
|
7 |
clippy::cast_sign_loss,
|
97 |
clippy::cast_possible_wrap,
|
98 |
clippy::cast_precision_loss,
|
99 |
clippy::cast_possible_truncation,
|
5 |
/// Internal function that builds a `FadeIn` object.
|
6 |
#[allow(unused, clippy::cast_precision_loss)]
|
7 |
pub fn fadein<I>(input: I, duration: Duration) -> FadeIn<I>
|
61 |
#[inline]
|
62 |
#[allow(clippy::cast_precision_loss)]
|
63 |
fn next(&mut self) -> Option<I::Item> {
|
75 |
clippy::cast_sign_loss,
|
76 |
clippy::cast_precision_loss
|
77 |
)]
|
27 |
}
|
28 |
#[allow(clippy::cast_precision_loss)]
|
29 |
impl DurationFilter {
|
16 |
impl Progress {
|
17 |
#[allow(clippy::cast_precision_loss)]
|
18 |
pub fn new(config: &Settings) -> Self {
|
125 |
#[allow(clippy::cast_possible_truncation, clippy::cast_precision_loss)]
|
126 |
fn rounded_division(value: i64, units: &str, divide_by: f64) -> String {
|
86 |
fn next_bool(&mut self, p: Probability) -> bool {
|
87 |
#[allow(clippy::cast_precision_loss)]
|
88 |
#[allow(clippy::cast_sign_loss)]
|
209 |
impl<'a> fmt::Display for TimeReporter {
|
210 |
#[allow(clippy::cast_precision_loss)]
|
211 |
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
53 |
// Centroid position.
|
54 |
#[allow(clippy::cast_precision_loss)]
|
55 |
let pos = self
|
1223 |
// We are sure that the cast is safe
|
1224 |
#[allow(clippy::cast_precision_loss)]
|
1225 |
#[allow(clippy::cast_sign_loss)]
|
81 |
let size = fs::metadata(path)?.len();
|
82 |
#[allow(clippy::cast_precision_loss)]
|
83 |
let float_size = size as f64;
|
181 |
#[inline]
|
182 |
#[allow(clippy::cast_precision_loss)]
|
183 |
pub(crate) fn val_eq<'event>(lhs: &Value<'event>, rhs: &Value<'event>) -> bool {
|
271 |
#[inline]
|
272 |
#[allow(clippy::cast_precision_loss, clippy::too_many_lines)]
|
273 |
fn exec_binary_numeric<'run, 'event, OuterExpr, InnerExpr>(
|
132 |
clippy::cast_possible_truncation,
|
133 |
clippy::cast_precision_loss,
|
134 |
clippy::cast_sign_loss
|
464 |
#[must_use]
|
465 |
#[allow(clippy::cast_precision_loss)]
|
466 |
fn cast_f64(&self) -> Option<f64> {
|
140 |
clippy::cast_possible_truncation,
|
141 |
clippy::cast_precision_loss
|
142 |
)]
|
213 |
{
|
214 |
#[allow(clippy::cast_precision_loss)]
|
215 |
let total_percentage_compressed =
|
421 |
/// number means it is more heavily loaded.
|
422 |
#[allow(clippy::cast_precision_loss, clippy::cast_possible_truncation)]
|
423 |
pub async fn penalty(&self) -> i32 {
|
265 |
// not occur any loss.
|
266 |
#[allow(clippy::cast_precision_loss)]
|
267 |
CommandOptionValue::Number(i as f64)
|
7 |
#[allow(clippy::cast_possible_truncation)]
|
8 |
#[allow(clippy::cast_precision_loss)]
|
9 |
impl Weighted {
|
24 |
#[allow(clippy::cast_precision_loss)]
|
25 |
#[allow(clippy::cast_possible_truncation)]
|
552 |
#[inline]
|
553 |
#[allow(clippy::cast_precision_loss, clippy::option_if_let_else)]
|
554 |
fn cast_f64(&self) -> Option<f64> {
|
567 |
#[inline]
|
568 |
#[allow(clippy::cast_precision_loss, clippy::option_if_let_else)]
|
569 |
fn try_cast_f64(&self) -> Result<f64, TryTypeError> {
|
218 |
#[must_use]
|
219 |
#[allow(clippy::cast_precision_loss)]
|
220 |
fn cast_f64(&self) -> Option<f64> {
|
230 |
#[inline]
|
231 |
#[allow(clippy::cast_precision_loss)]
|
232 |
fn cast_f64(&self) -> Option<f64> {
|
81 |
/// Sets the bounds of this [`Pen`] to the border of the canvas.
|
82 |
#[allow(clippy::cast_precision_loss)]
|
83 |
pub fn set_bounds_to_canvas(&mut self) -> &mut Self {
|
96 |
#[allow(clippy::cast_sign_loss)]
|
97 |
#[allow(clippy::cast_precision_loss)]
|
98 |
pub fn select<T: Number<T>>(
|
279 |
/// threshold = a * ( smooth( median ) + b ) ^ 2.
|
280 |
#[allow(clippy::cast_precision_loss)]
|
281 |
#[allow(clippy::cast_possible_wrap)]
|
33 |
/// Unknown or discarded values are encoded with 0.
|
34 |
#[allow(clippy::cast_precision_loss)]
|
35 |
#[allow(clippy::cast_possible_truncation)]
|
168 |
#[allow(clippy::used_underscore_binding)]
|
169 |
#[allow(clippy::cast_precision_loss)]
|
170 |
pub fn track(
|
282 |
#[allow(clippy::used_underscore_binding)]
|
283 |
#[allow(clippy::cast_precision_loss)]
|
284 |
fn warp_jacobians(
|
65 |
/// Also return the residuals vector and the indices of candidate points used.
|
66 |
#[allow(clippy::cast_precision_loss)]
|
67 |
#[allow(clippy::used_underscore_binding)]
|
225 |
#[allow(clippy::cast_sign_loss)]
|
226 |
#[allow(clippy::cast_precision_loss)]
|
227 |
fn interpolate(x: Float, y: Float, image: &DMatrix<u8>) -> Option<Float> {
|
23 |
#[allow(clippy::cast_precision_loss)]
|
24 |
pub(crate) fn clock() -> u64 {
|
1384 |
/// by the logical size.
|
1385 |
#[allow(clippy::cast_precision_loss)]
|
1386 |
#[allow(clippy::float_arithmetic)]
|
23 |
/// A string containing a abbreviated file size and units.
|
24 |
#[allow(clippy::cast_precision_loss)]
|
25 |
#[allow(clippy::cast_possible_truncation)]
|
95 |
#[allow(clippy::cast_sign_loss)]
|
96 |
#[allow(clippy::cast_precision_loss)]
|
97 |
#[case(1.5 * (1000 * 1000) as f32, None, None, "1.5 MB")]
|
156 |
/// A vector of integers guaranteed to sum to total.
|
157 |
#[allow(clippy::cast_precision_loss)]
|
158 |
#[allow(clippy::cast_possible_truncation)]
|
195 |
/// A vector of integers guaranteed to sum to total.
|
196 |
#[allow(clippy::cast_precision_loss)]
|
197 |
#[allow(clippy::cast_possible_truncation)]
|
304 |
// Currently, we have no other choice than casting an u64 into f64, with possible loss of precision
|
305 |
#[allow(clippy::cast_precision_loss)]
|
306 |
pub(super) fn current_time(&self) -> f64 {
|
66 |
#[must_use]
|
67 |
#[allow(clippy::cast_precision_loss)]
|
68 |
pub fn percent(number: usize, total: usize) -> f32 {
|
278 |
#[must_use]
|
279 |
#[allow(clippy::cast_precision_loss)]
|
280 |
pub fn calculate_percentage(number: usize, total: usize) -> f32 {
|
829 |
fn sample(&mut self, rng: &mut impl Rng) -> u32 {
|
830 |
#[allow(clippy::cast_precision_loss)]
|
831 |
let amount = (self.factor * self.index.pow(2) as f32 + 50.0 * self.noise.sample(rng)).round();
|
54 |
#[allow(clippy::cast_possible_truncation, clippy::cast_precision_loss)]
|
55 |
fn calc_percent(current: u64, max: u64) -> i32 {
|
50 |
#[allow(clippy::cast_precision_loss)]
|
51 |
#[allow(clippy::cast_possible_truncation)]
|
11 |
// We only want three digits accuracy, so f32 is fine.
|
12 |
#[allow(clippy::cast_precision_loss)]
|
13 |
// Conversions f32 -> usize are safe here.
|
360 |
// TODO: Use a proper size human formating function
|
361 |
#[allow(clippy::cast_precision_loss)]
|
362 |
let size_mb = (trace.num_rows() * trace.num_columns() * 32) as f64 / 1_000_000_f64;
|
257 |
#[allow(clippy::cast_precision_loss)] // Image and window sizes are likely much lower than 2^24
|
258 |
let uvs = ImageUvs::new(
|
292 |
#[allow(clippy::cast_precision_loss)] // Image and window sizes are likely much lower than 2^24
|
293 |
let uvs = ImageUvs::new(
|
30 |
clippy::cast_possible_truncation,
|
31 |
clippy::cast_precision_loss,
|
32 |
clippy::similar_names,
|
14 |
clippy::cast_possible_wrap,
|
15 |
clippy::cast_precision_loss,
|
16 |
clippy::cast_sign_loss,
|
29 |
#![allow(
|
30 |
clippy::cast_precision_loss,
|
31 |
clippy::cast_sign_loss,
|
384 |
#![allow(
|
385 |
clippy::cast_precision_loss,
|
386 |
clippy::cast_sign_loss,
|
10 |
clippy::unused_self,
|
11 |
clippy::cast_precision_loss
|
12 |
)]
|
327 |
clippy::cast_possible_wrap,
|
328 |
clippy::cast_precision_loss,
|
329 |
clippy::cast_sign_loss,
|
15 |
clippy::cast_possible_truncation,
|
16 |
clippy::cast_precision_loss,
|
17 |
clippy::cast_sign_loss,
|
5 |
#![allow(clippy::cast_possible_wrap)]
|
6 |
#![allow(clippy::cast_precision_loss)]
|
7 |
#![allow(clippy::cast_sign_loss)]
|
5 |
#![allow(clippy::cast_possible_wrap)]
|
6 |
#![allow(clippy::cast_precision_loss)]
|
7 |
#![allow(clippy::cast_sign_loss)]
|
14 |
#![allow(clippy::cast_possible_wrap)]
|
15 |
#![allow(clippy::cast_precision_loss)]
|
16 |
#![allow(clippy::cast_sign_loss)]
|
5 |
#![allow(clippy::cast_sign_loss)]
|
6 |
#![allow(clippy::cast_precision_loss)]
|
7 |
#![allow(clippy::must_use_candidate)]
|
15 |
clippy::cast_possible_wrap,
|
16 |
clippy::cast_precision_loss,
|
17 |
clippy::cast_sign_loss,
|
48 |
clippy::cast_possible_wrap,
|
49 |
clippy::cast_precision_loss,
|
50 |
clippy::default_trait_access,
|
14 |
clippy::missing_const_for_fn,
|
15 |
clippy::cast_precision_loss,
|
16 |
clippy::cast_possible_truncation,
|
14 |
clippy::missing_const_for_fn,
|
15 |
clippy::cast_precision_loss,
|
16 |
clippy::cast_possible_truncation,
|
17 |
#![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)]
|
18 |
#![allow(clippy::cast_precision_loss)]
|
19 |
#![allow(clippy::cast_possible_truncation)]
|
46 |
clippy::cast_sign_loss,
|
47 |
clippy::cast_precision_loss,
|
48 |
clippy::cast_possible_wrap,
|
57 |
clippy::cast_sign_loss,
|
58 |
clippy::cast_precision_loss,
|
59 |
clippy::cast_possible_wrap,
|
57 |
clippy::cast_sign_loss,
|
58 |
clippy::cast_precision_loss,
|
59 |
clippy::cast_possible_wrap,
|
54 |
clippy::cast_sign_loss,
|
55 |
clippy::cast_precision_loss,
|
56 |
clippy::cast_possible_wrap,
|
16 |
#![allow(clippy::cast_sign_loss)] // Annoying
|
17 |
#![allow(clippy::cast_precision_loss)] // Annoying
|
18 |
#![allow(clippy::cast_possible_truncation)] // Annoying
|
16 |
#![allow(clippy::cast_possible_truncation)] // Annoying
|
17 |
#![allow(clippy::cast_precision_loss)] // Annoying
|
18 |
#![allow(clippy::cast_sign_loss)] // Annoying
|
56 |
#![allow(clippy::cast_sign_loss)] // Annoying
|
57 |
#![allow(clippy::cast_precision_loss)] // Annoying
|
58 |
#![allow(clippy::cast_possible_truncation)] // Annoying
|
6 |
clippy::cast_sign_loss,
|
7 |
clippy::cast_precision_loss,
|
8 |
clippy::cast_possible_truncation
|
7 |
#![allow(
|
8 |
clippy::cast_precision_loss,
|
9 |
clippy::module_name_repetitions,
|
5 |
clippy::cast_possible_truncation,
|
6 |
clippy::cast_precision_loss,
|
7 |
clippy::cast_ptr_alignment,
|
4 |
clippy::cast_possible_truncation,
|
5 |
clippy::cast_precision_loss,
|
6 |
clippy::collapsible_else_if,
|
15 |
clippy::cast_possible_wrap,
|
16 |
clippy::cast_precision_loss,
|
17 |
clippy::cast_sign_loss,
|
5 |
#![warn(clippy::pedantic)]
|
6 |
#![allow(clippy::cast_precision_loss)]
|
277 |
clippy::cast_possible_truncation,
|
278 |
clippy::cast_precision_loss,
|
279 |
clippy::cast_sign_loss,
|
16 |
clippy::cast_possible_wrap,
|
17 |
clippy::cast_precision_loss,
|
18 |
clippy::cast_sign_loss,
|
45 |
clippy::cast_possible_truncation,
|
46 |
clippy::cast_precision_loss,
|
47 |
clippy::shadow_reuse,
|
54 |
cast_possible_truncation,
|
55 |
cast_precision_loss,
|
56 |
shadow_reuse,
|
16 |
clippy::cast_possible_truncation, // TODO: Fix these. See issue #1
|
17 |
clippy::cast_precision_loss, // TODO: Fix these. See issue #1
|
18 |
)]
|
15 |
clippy::cast_possible_wrap,
|
16 |
clippy::cast_precision_loss,
|
17 |
clippy::cast_sign_loss,
|
33 |
clippy::cast_sign_loss,
|
34 |
clippy::cast_precision_loss,
|
35 |
clippy::cast_lossless,
|
45 |
clippy::must_use_candidate,
|
46 |
clippy::cast_precision_loss,
|
47 |
clippy::struct_excessive_bools
|
5 |
clippy::cast_possible_wrap,
|
6 |
clippy::cast_precision_loss,
|
7 |
clippy::cast_sign_loss,
|
36 |
clippy::cast_possible_truncation,
|
37 |
clippy::cast_precision_loss,
|
38 |
clippy::cast_sign_loss,
|
11 |
// even close to having 32 bits represent the number of indices.
|
12 |
#![allow(clippy::cast_precision_loss)]
|
13 |
// The pattern `SIZE / 2 + 1` is common in this code. Removing the trailing `+ 1` is confusing.
|
86 |
clippy::cast_possible_truncation,
|
87 |
clippy::cast_precision_loss,
|
88 |
clippy::cast_sign_loss,
|
75 |
clippy::similar_names,
|
76 |
clippy::cast_precision_loss,
|
77 |
clippy::float_cmp
|
39 |
clippy::cast_lossless,
|
40 |
clippy::cast_precision_loss,
|
41 |
clippy::missing_const_for_fn,
|
87 |
// Non-improvemet lints.
|
88 |
#![allow(clippy::cast_precision_loss)]
|
89 |
#![allow(clippy::default_trait_access)]
|
77 |
#![allow(clippy::cast_possible_truncation)] // All our casts are in a range where this doesn't matter.
|
78 |
#![allow(clippy::cast_precision_loss)]
|
79 |
#![allow(clippy::cast_possible_wrap)]
|
25 |
clippy::cast_possible_wrap,
|
26 |
clippy::cast_precision_loss,
|
27 |
clippy::cast_sign_loss,
|
20 |
clippy::cast_possible_wrap,
|
21 |
clippy::cast_precision_loss,
|
22 |
clippy::cast_sign_loss,
|
1 |
#![allow(
|
2 |
clippy::cast_precision_loss,
|
3 |
clippy::cast_sign_loss,
|
4 |
clippy::new_ret_no_self,
|
5 |
clippy::cast_precision_loss,
|
6 |
clippy::missing_safety_doc,
|
8 |
clippy::cast_sign_loss,
|
9 |
clippy::cast_precision_loss
|
10 |
)]
|
73 |
clippy::cast_lossless,
|
74 |
clippy::cast_precision_loss,
|
75 |
clippy::float_cmp,
|
73 |
clippy::cast_lossless,
|
74 |
clippy::cast_precision_loss,
|
75 |
clippy::float_cmp,
|
5 |
#![allow(clippy::cast_possible_wrap)]
|
6 |
#![allow(clippy::cast_precision_loss)]
|
7 |
#![allow(clippy::cast_sign_loss)]
|
7 |
clippy::cast_possible_wrap,
|
8 |
clippy::cast_precision_loss,
|
9 |
clippy::cast_sign_loss,
|
5 |
clippy::type_complexity,
|
6 |
clippy::cast_precision_loss,
|
7 |
clippy::default_trait_access
|
1 |
#![allow(clippy::cast_precision_loss)]
|
52 |
fn int_to_float(x: u64) -> f64 {
|
53 |
#![allow(clippy::as_conversions, clippy::cast_precision_loss)]
|
54 |
x as f64
|
13 |
clippy::cast_sign_loss,
|
14 |
clippy::cast_precision_loss,
|
15 |
clippy::cast_possible_truncation
|
3 |
// This is currently a non-issue, and can be ignored.
|
4 |
#![allow(clippy::cast_precision_loss)]
|
18 |
clippy::cast_possible_truncation,
|
19 |
clippy::cast_precision_loss,
|
20 |
clippy::mut_mut, // false alarm on futures::select!
|
17 |
clippy::cast_possible_truncation,
|
18 |
clippy::cast_precision_loss,
|
19 |
clippy::mut_mut, // false alarm on futures::select!
|
18 |
clippy::cast_possible_truncation,
|
19 |
clippy::cast_precision_loss,
|
20 |
clippy::mut_mut, // false alarm on futures::select!
|
1 |
#![warn(clippy::pedantic, clippy::nursery)]
|
2 |
#![allow(clippy::cast_precision_loss)]
|
9 |
#![allow(
|
10 |
clippy::cast_precision_loss,
|
11 |
clippy::cast_possible_truncation,
|
55 |
clippy::cast_sign_loss,
|
56 |
clippy::cast_precision_loss,
|
57 |
clippy::cast_lossless
|
13 |
clippy::cast_sign_loss,
|
14 |
clippy::cast_precision_loss,
|
15 |
clippy::cast_lossless
|
245 |
clippy::cast_sign_loss,
|
246 |
clippy::cast_precision_loss,
|
247 |
clippy::cast_lossless
|
68 |
clippy::cast_sign_loss,
|
69 |
clippy::cast_precision_loss,
|
70 |
clippy::cast_lossless
|
1 |
#![allow(clippy::cast_precision_loss)]
|
2 |
//! This is a library for exploring regret minimization
|
29 |
#![recursion_limit = "128"]
|
30 |
#![allow(clippy::cast_precision_loss)]
|
117 |
clippy::too_many_lines,
|
118 |
clippy::cast_precision_loss,
|
119 |
clippy::cast_sign_loss,
|
1 |
#![allow(clippy::cast_precision_loss)]
|
1 |
#![allow(
|
2 |
clippy::cast_precision_loss,
|
3 |
clippy::cast_sign_loss,
|
11 |
#![allow(clippy::cast_possible_truncation)]
|
12 |
#![allow(clippy::cast_precision_loss)]
|
4 |
#![allow(
|
5 |
clippy::cast_precision_loss,
|
6 |
clippy::cast_sign_loss,
|
25 |
clippy::cast_possible_wrap,
|
26 |
clippy::cast_precision_loss,
|
27 |
clippy::cast_sign_loss,
|
26 |
clippy::cast_possible_wrap,
|
27 |
clippy::cast_precision_loss,
|
28 |
clippy::cast_sign_loss,
|
25 |
clippy::cast_possible_wrap,
|
26 |
clippy::cast_precision_loss,
|
27 |
clippy::cast_sign_loss,
|
25 |
clippy::cast_possible_wrap,
|
26 |
clippy::cast_precision_loss,
|
27 |
clippy::cast_sign_loss,
|
25 |
clippy::cast_possible_wrap,
|
26 |
clippy::cast_precision_loss,
|
27 |
clippy::cast_sign_loss,
|
26 |
clippy::cast_possible_wrap,
|
27 |
clippy::cast_precision_loss,
|
28 |
clippy::cast_sign_loss,
|
25 |
clippy::cast_possible_wrap,
|
26 |
clippy::cast_precision_loss,
|
27 |
clippy::cast_sign_loss,
|
25 |
clippy::cast_possible_wrap,
|
26 |
clippy::cast_precision_loss,
|
27 |
clippy::cast_sign_loss,
|
139 |
clippy::cast_possible_wrap,
|
140 |
clippy::cast_precision_loss,
|
141 |
clippy::checked_conversions,
|
149 |
clippy::cast_possible_wrap,
|
150 |
clippy::cast_precision_loss,
|
151 |
clippy::checked_conversions,
|
148 |
clippy::cast_possible_wrap,
|
149 |
clippy::cast_precision_loss,
|
150 |
clippy::checked_conversions,
|
25 |
clippy::cast_possible_wrap,
|
26 |
clippy::cast_precision_loss,
|
27 |
clippy::cast_sign_loss,
|
8 |
clippy::cast_sign_loss,
|
9 |
clippy::cast_precision_loss,
|
10 |
clippy::too_many_lines,
|
316 |
{
|
317 |
#![allow(clippy::cast_precision_loss)]
|
318 |
let solved: f64 = line.map(|cell| self.cell_solution_rate(cell)).sum();
|
7 |
#![warn(clippy::nursery, clippy::pedantic)]
|
8 |
#![allow(clippy::cast_precision_loss, clippy::cognitive_complexity, clippy::missing_panics_doc, clippy::similar_names, clippy::too_many_lines, clippy::uninlined_format_args)]
|
7 |
#![warn(clippy::nursery, clippy::pedantic)]
|
8 |
#![allow(clippy::cast_precision_loss, clippy::cognitive_complexity, clippy::missing_panics_doc, clippy::similar_names, clippy::too_many_lines, clippy::uninlined_format_args)]
|
233 |
clippy::cast_possible_wrap,
|
234 |
clippy::cast_precision_loss,
|
235 |
// TODO: manually add the `#[must_use]` attribute where appropriate
|
3 |
clippy::cast_possible_wrap,
|
4 |
clippy::cast_precision_loss,
|
5 |
clippy::cast_sign_loss
|
1 |
#![allow(clippy::too_many_arguments, clippy::cast_precision_loss)]
|
2 |
clippy::cast_sign_loss,
|
3 |
clippy::cast_precision_loss,
|
4 |
clippy::cast_possible_truncation
|
167 |
#![allow(
|
168 |
clippy::cast_precision_loss,
|
169 |
clippy::cast_possible_wrap,
|
437 |
fn fill_triangle<P: Into<Vi2d>>(&mut self, pts1: P, pts2: P, pts3: P, col: Color) {
|
438 |
#![allow(clippy::cast_precision_loss)]
|
439 |
use std::cmp::{max, min};
|
542 |
#![allow(
|
543 |
clippy::cast_precision_loss,
|
544 |
clippy::cast_possible_wrap,
|
603 |
#![allow(
|
604 |
clippy::cast_precision_loss,
|
605 |
clippy::cast_possible_wrap,
|
13 |
#![allow(clippy::float_cmp)]
|
14 |
#![allow(clippy::cast_precision_loss)]
|
15 |
#![allow(clippy::cast_possible_truncation)]
|
5 |
clippy::cast_possible_wrap,
|
6 |
clippy::cast_precision_loss,
|
7 |
clippy::cast_sign_loss,
|
5 |
clippy::cast_possible_wrap,
|
6 |
clippy::cast_precision_loss,
|
7 |
clippy::cast_sign_loss,
|
2 |
#![allow(clippy::default_trait_access)]
|
3 |
#![allow(clippy::cast_precision_loss)]
|
4 |
#![allow(clippy::cast_possible_truncation)]
|
1 |
#![allow(
|
2 |
clippy::cast_precision_loss,
|
3 |
clippy::cast_lossless,
|
29 |
#![allow(
|
30 |
clippy::cast_precision_loss, // The precision loss is often expected
|
31 |
clippy::default_trait_access, // Alternative can be complex types, not more clear
|
2 |
#![allow(
|
3 |
clippy::cast_precision_loss,
|
4 |
clippy::cast_possible_wrap,
|
7 |
clippy::cast_possible_truncation,
|
8 |
clippy::cast_precision_loss,
|
9 |
clippy::items_after_statements,
|
3 |
#![allow(clippy::cast_possible_truncation)]
|
4 |
#![allow(clippy::cast_precision_loss)]
|
5 |
#![doc = include_str!("../README.md")]
|
3 |
#![allow(clippy::cast_lossless, clippy::cast_precision_loss)]
|
3 |
#![allow(clippy::cast_precision_loss, clippy::too_many_arguments)]
|
66 |
) -> Result<f32> {
|
67 |
#![allow(clippy::cast_precision_loss)]
|
68 |
let height = task.as_secs() as f32 / BAR_HEIGHT;
|
25 |
pub fn add_secs(&mut self, label: &str, secs: u64) {
|
26 |
#![allow(clippy::cast_precision_loss)]
|
27 |
let secs = secs as f32;
|
53 |
clippy::unused_self,
|
54 |
clippy::cast_precision_loss,
|
55 |
clippy::print_stdout,
|
12 |
clippy::unused_self,
|
13 |
clippy::cast_precision_loss,
|
14 |
clippy::print_stdout,
|
1 |
#![warn(clippy::all, clippy::pedantic)]
|
2 |
#![allow(clippy::cast_precision_loss, clippy::cast_possible_truncation)]
|
3 |
mod game;
|
31 |
#![allow(clippy::float_arithmetic)]
|
32 |
#![allow(clippy::cast_precision_loss)]
|
33 |
#![allow(clippy::cast_possible_truncation)]
|
28 |
#![recursion_limit = "128"]
|
29 |
#![allow(clippy::cast_precision_loss)]
|
334 |
clippy::cast_possible_wrap,
|
335 |
clippy::cast_precision_loss,
|
336 |
clippy::cast_sign_loss,
|
4 |
clippy::cast_possible_wrap,
|
5 |
clippy::cast_precision_loss,
|
6 |
clippy::cast_sign_loss,
|
3 |
clippy::assertions_on_result_states,
|
4 |
clippy::cast_precision_loss,
|
5 |
clippy::derive_partial_eq_without_eq,
|
332 |
cast_possible_wrap,
|
333 |
cast_precision_loss,
|
334 |
cast_sign_loss,
|
335 |
clippy::cast_possible_wrap,
|
336 |
clippy::cast_precision_loss,
|
337 |
clippy::cast_sign_loss,
|
306 |
cast_possible_wrap,
|
307 |
cast_precision_loss,
|
308 |
cast_sign_loss,
|
319 |
cast_possible_wrap,
|
320 |
cast_precision_loss,
|
321 |
cast_sign_loss,
|
327 |
clippy::cast_possible_wrap,
|
328 |
clippy::cast_precision_loss,
|
329 |
clippy::cast_sign_loss,
|
143 |
clippy::cast_possible_wrap,
|
144 |
clippy::cast_precision_loss,
|
145 |
clippy::cast_sign_loss,
|
89 |
clippy::cast_possible_wrap,
|
90 |
clippy::cast_precision_loss,
|
91 |
clippy::derive_partial_eq_without_eq,
|
39 |
#![allow(
|
40 |
clippy::cast_precision_loss, // There is no way to avoid this precision loss
|
41 |
clippy::explicit_deref_methods, // Sometimes calling `deref` directly is clearer
|
15 |
clippy::cast_possible_truncation,
|
16 |
clippy::cast_precision_loss,
|
17 |
clippy::items_after_statements,
|
13 |
// Need to cast usizes to f64s where precision is not that important, also there seems to be no good alternative.
|
14 |
clippy::cast_precision_loss,
|
15 |
)]
|
94 |
#![allow(clippy::cast_possible_truncation)]
|
95 |
#![allow(clippy::cast_precision_loss)]
|
96 |
#![allow(clippy::cast_sign_loss)]
|
3 |
#![allow(clippy::cast_possible_truncation)]
|
4 |
#![allow(clippy::cast_precision_loss)]
|
5 |
#![allow(clippy::cast_sign_loss)]
|
15 |
#![allow(clippy::cast_possible_truncation)]
|
16 |
#![allow(clippy::cast_precision_loss)]
|
17 |
#![allow(clippy::cast_sign_loss)]
|
60 |
clippy::cast_possible_wrap,
|
61 |
clippy::cast_precision_loss,
|
62 |
clippy::cast_sign_loss,
|
5 |
#![allow(clippy::cast_possible_wrap)]
|
6 |
#![allow(clippy::cast_precision_loss)]
|
7 |
#![allow(clippy::cast_sign_loss)]
|
2 |
#![allow(clippy::too_many_lines)]
|
3 |
#![allow(clippy::cast_precision_loss)]
|
4 |
#![allow(clippy::cast_sign_loss)]
|
10 |
//@todo remove eventually
|
11 |
#![allow(clippy::cast_precision_loss)]
|
4 |
#![allow(clippy::module_name_repetitions)]
|
5 |
#![allow(clippy::cast_precision_loss)]
|
6 |
#![allow(clippy::cast_sign_loss)]
|
65 |
clippy::expect_used,
|
66 |
clippy::cast_precision_loss,
|
67 |
clippy::cast_possible_wrap,
|
36 |
clippy::cast_possible_wrap,
|
37 |
clippy::cast_precision_loss,
|
38 |
clippy::cast_sign_loss,
|
1 |
#![warn(clippy::pedantic)]
|
2 |
#![allow(clippy::cast_precision_loss)]
|
3 |
#![allow(clippy::cast_possible_truncation)]
|
13 |
// limitations under the License.
|
14 |
#![allow(clippy::cast_precision_loss)]
|
13 |
// limitations under the License.
|
14 |
#![allow(clippy::cast_precision_loss)]
|
5 |
clippy::missing_const_for_fn,
|
6 |
clippy::cast_precision_loss,
|
7 |
clippy::cast_sign_loss,
|
4 |
clippy::cast_sign_loss,
|
5 |
clippy::cast_precision_loss,
|
6 |
clippy::module_name_repetitions,
|
79 |
clippy::module_name_repetitions,
|
80 |
clippy::cast_precision_loss,
|
81 |
clippy::cast_possible_truncation
|
1 |
#![allow(clippy::cast_precision_loss)]
|
219 |
clippy::cast_possible_wrap,
|
220 |
clippy::cast_precision_loss,
|
221 |
// This lint is currently broken for generic code
|
5 |
#![allow(clippy::cast_possible_wrap)]
|
6 |
#![allow(clippy::cast_precision_loss)]
|
7 |
#![allow(clippy::cast_sign_loss)]
|
94 |
#![allow(clippy::cast_possible_truncation)]
|
95 |
#![allow(clippy::cast_precision_loss)]
|
96 |
#![allow(clippy::cast_sign_loss)]
|
4 |
clippy::cast_sign_loss,
|
5 |
clippy::cast_precision_loss,
|
6 |
clippy::module_name_repetitions,
|
1 |
#![allow(clippy::cast_possible_truncation)]
|
2 |
#![allow(clippy::cast_precision_loss)]
|
3 |
#![allow(clippy::cast_lossless)]
|
1 |
#![allow(clippy::too_many_arguments)]
|
2 |
#![allow(clippy::cast_precision_loss)]
|
3 |
#![allow(clippy::missing_errors_doc)]
|
33 |
#![allow(clippy::missing_errors_doc)]
|
34 |
#![allow(clippy::cast_precision_loss)]
|
35 |
#![allow(renamed_and_removed_lints)] // workaround clippy unknown lints when rust stable 1.50. May be removed in the future
|
7 |
#![allow(clippy::cast_possible_wrap)]
|
8 |
#![allow(clippy::cast_precision_loss)]
|
9 |
#![allow(clippy::cast_sign_loss)]
|
5 |
#![allow(clippy::cast_possible_wrap)]
|
6 |
#![allow(clippy::cast_precision_loss)]
|
7 |
#![allow(clippy::cast_sign_loss)]
|