浏览代码

A couple more doc touchups in sigma::types

Ian Goldberg 4 月之前
父节点
当前提交
62f45215e5
共有 1 个文件被更改,包括 8 次插入5 次删除
  1. 8 5
      sigma_compiler_core/src/sigma/types.rs

+ 8 - 5
sigma_compiler_core/src/sigma/types.rs

@@ -83,9 +83,11 @@ impl From<&str> for AExprType {
 /// to their [`AExprType`]
 pub type VarDict = HashMap<String, AExprType>;
 
-/// Pass a slice of pairs of strings.  The first element of each
-/// pair is the variable name; the second is the [`AExprType`], as
-/// listed in the [`AExprType::from`] function
+/// Create a [`VarDict`] from a slice of pairs of strings.
+///
+/// The first element of each pair is the variable name; the second
+/// represents the [`AExprType`], as listed in the [`AExprType::from`]
+/// function
 pub fn vardict_from_strs(strs: &[(&str, &str)]) -> VarDict {
     let c = strs
         .iter()
@@ -95,8 +97,9 @@ pub fn vardict_from_strs(strs: &[(&str, &str)]) -> VarDict {
 
 /// Given a [`VarDict`] and an [`Expr`] representing an arithmetic
 /// expression using the variables in the [`VarDict`], compute the
-/// [`AExprType`] of the expression.  An arithmetic expression can consist
-/// of:
+/// [`AExprType`] of the expression.
+///
+/// An arithmetic expression can consist of:
 ///   - variables that are in the [`VarDict`]
 ///   - integer constants
 ///   - the operations `*`, `+`, `-` (binary or unary)