Skip to content

Commit

Permalink
Merge pull request #67 from grovesNL/add-docs
Browse files Browse the repository at this point in the history
Fill out some more docs
  • Loading branch information
jackpot51 authored Jan 30, 2023
2 parents 983d6b7 + a3e0358 commit f92a205
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ impl Color {
}
}

/// An owned version of [`Family`]
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub enum FamilyOwned {
Name(String),
Expand Down Expand Up @@ -177,6 +178,7 @@ impl<'a> Attrs<'a> {
}
}

/// An owned version of [`Attrs`]
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct AttrsOwned {
//TODO: should this be an option?
Expand Down
2 changes: 2 additions & 0 deletions src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ impl Cursor {
}
}

/// Whether to associate cursors placed at a boundary between runs with the run before or after it.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
pub enum Affinity {
Before,
Expand Down Expand Up @@ -78,6 +79,7 @@ impl Default for Affinity {
}
}

/// The position of a cursor within a [`Buffer`].
pub struct LayoutCursor {
pub line: usize,
pub layout: usize,
Expand Down
1 change: 1 addition & 0 deletions src/font/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ mod matches;
pub use self::system::*;
mod system;

/// A font
pub struct Font<'a> {
pub info: &'a fontdb::FaceInfo,
pub data: &'a [u8],
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
// Not interested in these lints
#![allow(clippy::new_without_default)]
// TODO: address ocurrances and then deny
// TODO: address occurrences and then deny
//
// Indexing a slice can cause panics and that is something we always want to avoid
#![allow(clippy::indexing_slicing)]
// Overflows can produce unpredictable results and are only checked in debug builds
#![allow(clippy::integer_arithmetic)]
// Soundness issues
//
// Dereferencing unalinged pointers may be undefined behavior
// Dereferencing unaligned pointers may be undefined behavior
#![deny(clippy::cast_ptr_alignment)]
// Avoid panicking in without information about the panic. Use expect
#![deny(clippy::unwrap_used)]
Expand Down

0 comments on commit f92a205

Please sign in to comment.