1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 12:50:04 -04:00

clippy fixes from 1.69.0

This commit is contained in:
Emil Ernerfeldt
2023-04-21 11:33:18 +02:00
parent 4d360f67a4
commit 4d357b0f02
17 changed files with 53 additions and 61 deletions

View File

@@ -67,12 +67,13 @@ impl std::hash::Hash for FontId {
///
/// Which style of font: [`Monospace`][`FontFamily::Monospace`], [`Proportional`][`FontFamily::Proportional`],
/// or by user-chosen name.
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
pub enum FontFamily {
/// A font where some characters are wider than other (e.g. 'w' is wider than 'i').
///
/// Proportional fonts are easier to read and should be the preferred choice in most situations.
#[default]
Proportional,
/// A font where each character is the same width (`w` is the same width as `i`).
@@ -91,13 +92,6 @@ pub enum FontFamily {
Name(Arc<str>),
}
impl Default for FontFamily {
#[inline]
fn default() -> Self {
FontFamily::Proportional
}
}
impl std::fmt::Display for FontFamily {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {