Merge pull request #621 from betrusted-io/modals-refactor

Fix doc build errors
This commit is contained in:
bunnie 2025-02-17 22:58:47 +08:00 committed by GitHub
commit cb197a59c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 3 deletions

View file

@ -0,0 +1,6 @@
// Dummy values to allow cargo doc to build
pub const LINES: isize = 536;
pub const WIDTH: isize = 336;
pub const WORDS_PER_LINE: usize = 11;
pub type FrBuf = [u32; WORDS_PER_LINE * LINES as usize];
pub const FB_SIZE: usize = WORDS_PER_LINE * LINES as usize; // 44 bytes by 536 lines

View file

@ -9,3 +9,22 @@ pub use baosec::*;
mod precursor; mod precursor;
#[cfg(any(feature = "hosted", feature = "renode", feature = "precursor"))] #[cfg(any(feature = "hosted", feature = "renode", feature = "precursor"))]
pub use precursor::*; pub use precursor::*;
// Dummy configuration to allow cargo doc to run - this has no board specified
#[cfg(any(
all(
not(any(feature = "board-baosec", feature = "hosted-baosec")),
not(any(feature = "hosted", feature = "renode", feature = "precursor"))
),
doc
))]
mod doc;
#[cfg(any(
all(
not(any(feature = "board-baosec", feature = "hosted-baosec")),
not(any(feature = "hosted", feature = "renode", feature = "precursor"))
),
doc
))]
pub use doc::*;

View file

@ -44,7 +44,7 @@ pub struct TypesetWord {
/// overall height for the word /// overall height for the word
pub height: i16, pub height: i16,
/// set if this `word` is not drawable, e.g. a newline placeholder. /// set if this `word` is not drawable, e.g. a newline placeholder.
/// *however* the Vec<GlyphSprite> should still be checked for an insertion point, so that /// *however* the `Vec<GlyphSprite>` should still be checked for an insertion point, so that
/// successive newlines properly get their insertion point drawn /// successive newlines properly get their insertion point drawn
pub non_drawable: bool, pub non_drawable: bool,
/// the position in the originating abstract string of the first character in the word /// the position in the originating abstract string of the first character in the word
@ -294,7 +294,7 @@ impl Typesetter {
/// the caller must reset the cursor to the desired resume position, otherwise it will pick /// the caller must reset the cursor to the desired resume position, otherwise it will pick
/// up again at the overflow position. /// up again at the overflow position.
/// ///
/// The final Vec::<TypesetWord> is snapped to the top left of the Renderable region. This /// The final `Vec::<TypesetWord>` is snapped to the top left of the Renderable region. This
/// needs to be transformed into the final screen coordinate space before blitting. /// needs to be transformed into the final screen coordinate space before blitting.
pub fn typeset(&mut self, strat: OverflowStrategy) -> ComposedType { pub fn typeset(&mut self, strat: OverflowStrategy) -> ComposedType {
// a composition only lasts as long as the lifetime of this call, and is passed back to the caller // a composition only lasts as long as the lifetime of this call, and is passed back to the caller

View file

@ -43,4 +43,5 @@ board-baosec = ["ux-api/board-baosec"]
tts = [] tts = []
ditherpunk = [] ditherpunk = []
hazardous-debug = [] hazardous-debug = []
default = ["trng"] # "gam" is required for cargo doc to run successfully
default = ["trng", "gam"]