mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 11:46:42 +01:00
parent
4a385b40ff
commit
cb8fd26922
8 changed files with 234 additions and 257 deletions
|
|
@ -64,7 +64,6 @@ pub type Perhaps<T> = Result<Option<T>, Box<dyn Error>>;
|
|||
#[cfg(test)] mod test {
|
||||
use crate::*;
|
||||
use proptest::{prelude::*, option::of};
|
||||
use proptest::option::of;
|
||||
|
||||
proptest! {
|
||||
#[test] fn proptest_direction (
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
use crate::*;
|
||||
pub use Direction::*;
|
||||
/// A split or layer.
|
||||
pub struct Bsp<X, Y>(Direction, X, Y);
|
||||
pub struct Bsp<A, B>(
|
||||
pub(crate) Direction,
|
||||
pub(crate) A,
|
||||
pub(crate) B,
|
||||
);
|
||||
impl<E: Output, A: Content<E>, B: Content<E>> Content<E> for Bsp<A, B> {
|
||||
fn layout (&self, outer: E::Area) -> E::Area {
|
||||
let [_, _, c] = self.areas(outer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue