Skip to content

Commit

Permalink
Better documentation of DictType
Browse files Browse the repository at this point in the history
Reviewed By: JakobDegen

Differential Revision: D62668748

fbshipit-source-id: 764c23f1202ebe01cdfb4577c0d3314aad1d86a7
  • Loading branch information
stepancheg authored and facebook-github-bot committed Sep 14, 2024
1 parent 5f84c8e commit 534e34b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions starlark-rust/starlark/src/values/types/dict/dict_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ use crate::values::UnpackAndDiscard;
use crate::values::UnpackValue;
use crate::values::Value;

/// A dict used just for display purposes.
/// A dict type marker.
///
/// `DictOf` requires `Unpack` to be implemented, and `Dict` does not take type parameters so
/// we need something for documentation generation.
/// [`StarlarkTypeRepr`] provides `dict[K, V]`.
/// [`UnpackValue`] implementation verifies the types of entries and discards them.
pub struct DictType<K: StarlarkTypeRepr, V: StarlarkTypeRepr> {
k: PhantomData<K>,
v: PhantomData<V>,
Expand Down

0 comments on commit 534e34b

Please sign in to comment.