Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
WIP: Start geometry crate
Mikayla1902df931608
diff --git a/crates/gpui/src/geometry.rs b/crates/gpui/src/geometry.rsindex 0a22611fac8..ef71f94ef66 100644--- a/crates/gpui/src/geometry.rs+++ b/crates/gpui/src/geometry.rs@@ -1,3 +1,7 @@+//! The GPUI geometry module is a collection of types and traits that+//! can be used to describe common units, concepts, and the relationships+//! between them.+use core::fmt::Debug;use derive_more::{Add, AddAssign, Div, DivAssign, Mul, Neg, Sub, SubAssign};use refineable::Refineable;@@ -8,13 +12,17 @@ use std::{ops::{Add, Div, Mul, MulAssign, Sub},};+/// An axis along which a measurement can be made.#[derive(Copy, Clone, PartialEq, Eq, Debug)]pub enum Axis {+ /// The y axis, or up and downVertical,+ /// The x axis, or left and rightHorizontal,}impl Axis {+ /// Swap this axis to the opposite axis.pub fn invert(&self) -> Self {match self {Axis::Vertical => Axis::Horizontal,diff --git a/crates/gpui/src/gpui.rs b/crates/gpui/src/gpui.rsindex a64d043ab87..8ecfd8ad6d8 100644--- a/crates/gpui/src/gpui.rs+++ b/crates/gpui/src/gpui.rs@@ -26,7 +26,7 @@//! TODO!(docs): Wrap up with a conclusion and links to other places? Zed / GPUI website?//! Discord for chatting about it? Other tutorials or references?-// #![deny(missing_docs)]+#![deny(missing_docs)]#![allow(clippy::type_complexity)]#[macro_use]