Skip to content

Commit

Permalink
Fix typos, mark docs related todos in GPUI
Browse files Browse the repository at this point in the history
  • Loading branch information
mikayla-maki committed Jan 21, 2024
1 parent aa57a4c commit 660a391
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/gpui/src/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl fmt::Debug for Rgba {

impl Rgba {
/// Create a new [`Rgba`] color by blending this and another color together
/// TODO: find the source for this algorithm
/// TODO!(docs): find the source for this algorithm
pub fn blend(&self, other: Rgba) -> Self {
if other.a >= 1.0 {
other
Expand Down
2 changes: 1 addition & 1 deletion crates/gpui/src/elements/div.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! # Capturing and bubbling
//!
//! Note that while event dispatch in GPUI uses similar names and concepts to the web
//! even API, the details are very different. See the documentation in [TODO
//! even API, the details are very different. See the documentation in [TODO!(docs)
//! DOCUMENT EVENT DISPATCH SOMEWHERE IN WINDOW CONTEXT] for more details
//!
Expand Down
12 changes: 5 additions & 7 deletions crates/gpui/src/gpui.rs
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
//! # Welcome to GPUI!
//!
//! GPUI is a hybrid immedate and retained mode, GPU accelerated, UI framework
//! GPUI is a hybrid immediate and retained mode, GPU accelerated, UI framework
//! for Rust, designed to support a wide variety of applications. GPUI is currently
//! being actively developed and improved for the [Zed code editor](https://zed.dev/), and new versions
//! will have breaking changes. You'll probably need to use the latest stable version
//! of rust to use GPUI.
//!
//! # Getting started with GPUI
//!
//! TODO: Write a code sample showing how to create a window and render a simple
//! TODO!(docs): Write a code sample showing how to create a window and render a simple
//! div
//!
//! # Drawing interesting things
//!
//! TODO: Expand demo to show how to draw a more interesting scene, with
//! TODO!(docs): Expand demo to show how to draw a more interesting scene, with
//! a counter to store state and a button to increment it.
//!
//! # Interacting with your application state
//!
//! TODO: Expand demo to show GPUI entity interactions, like subscriptions and entities
//! TODO!(docs): Expand demo to show GPUI entity interactions, like subscriptions and entities
//! maybe make a network request to show async stuff?
//!
//! # Conclusion
//!
//! TODO: Wrap up with a conclusion and links to other places? Zed / GPUI website?
//! 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)]

#[macro_use]
mod action;
mod app;
Expand Down
2 changes: 1 addition & 1 deletion crates/gpui/src/keymap/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl KeyContext {
/// The key context format is very simple:
/// - either a single identifier, such as `StatusBar`
/// - or a key value pair, such as `mode = visible`
/// - seperated by whitespace, such as `StatusBar mode = visible`
/// - separated by whitespace, such as `StatusBar mode = visible`
pub fn parse(source: &str) -> Result<Self> {
let mut context = Self::default();
let source = skip_whitespace(source);
Expand Down
2 changes: 1 addition & 1 deletion crates/gpui/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use std::{
panic::{self, RefUnwindSafe},
};

/// Run the given test function with the confifured paremeters.
/// Run the given test function with the configured parameters.
/// This is intended for use with the `gpui::test` macro
/// and generally should not be used directly.
pub fn run_test(
Expand Down

0 comments on commit 660a391

Please sign in to comment.