mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
clippy fixes from 1.69.0
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user