gpui: Further docs refinement & moved some reexports into 'private' module (#3935)

This commit mostly fixes invalid URLs in docstrings. It also
encapsulates crates we reexport (serde stuff + linkme) into a public
module named "private" in order to reduce the API surfaced through docs.
Moreover, I fixed up a bunch of crates that were pulling serde_json in
through gpui explicitly instead of using Cargo manifest.

Release Notes:
- N/A
This commit is contained in:
Piotr Osiewicz 2024-01-07 14:14:21 +01:00 committed by GitHub
parent eb9ddef083
commit d475f1373a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 91 additions and 72 deletions

View file

@ -18,6 +18,7 @@ palette = { version = "0.7.3", default-features = false, features = ["std"] }
pathfinder_color = "0.5"
rust-embed.workspace = true
serde.workspace = true
serde_json.workspace = true
simplelog = "0.9"
strum = { version = "0.25.0", features = ["derive"] }
theme = { path = "../theme", features = ["importing-themes"] }

View file

@ -16,7 +16,6 @@ use any_ascii::any_ascii;
use anyhow::{anyhow, Context, Result};
use clap::Parser;
use convert_case::{Case, Casing};
use gpui::serde_json;
use indexmap::IndexMap;
use indoc::formatdoc;
use json_comments::StripComments;

View file

@ -1,5 +1,5 @@
use anyhow::{Context, Result};
use gpui::{serde_json, Hsla, Rgba};
use gpui::{Hsla, Rgba};
use theme::{
color_alpha, Appearance, PlayerColor, PlayerColors, StatusColorsRefinement,
ThemeColorsRefinement, UserFontStyle, UserFontWeight, UserHighlightStyle, UserSyntaxTheme,

View file

@ -6,10 +6,10 @@ use std::fmt;
use std::ops::{Deref, DerefMut};
use std::sync::Arc;
use gpui::serde_json::{self, Value};
use pathfinder_color::ColorU;
use serde::de::{self, DeserializeOwned, Unexpected};
use serde::{Deserialize, Deserializer};
use serde_json::{self, Value};
#[derive(Clone, Copy, Default, PartialEq, Eq, Hash, PartialOrd, Ord)]
#[repr(transparent)]