浏览代码

url_template: Small doc fixes

Johannes Hofmann 7 年前
父节点
当前提交
5f0777c521
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3
    2
      src/url_template.rs

+ 3
- 2
src/url_template.rs 查看文件

16
 }
16
 }
17
 
17
 
18
 impl Placeholder {
18
 impl Placeholder {
19
-    /// Returns maximum number of bytes that the value for a placeholder with occupy.
19
+    /// Returns maximum number of bytes that the value for a placeholder will occupy.
20
     fn max_size(&self) -> usize {
20
     fn max_size(&self) -> usize {
21
         match *self {
21
         match *self {
22
             Placeholder::X | Placeholder::Y | Placeholder::Z => 11,
22
             Placeholder::X | Placeholder::Y | Placeholder::Z => 11,
25
     }
25
     }
26
 }
26
 }
27
 
27
 
28
+/// A template for tile URLs that can be efficiently filled with values from a `TileCoord`.
28
 #[derive(Debug)]
29
 #[derive(Debug)]
29
 pub struct UrlTemplate {
30
 pub struct UrlTemplate {
30
     /// The template string that includes placeholders between static parts
31
     /// The template string that includes placeholders between static parts
31
     template_string: String,
32
     template_string: String,
32
-    /// Ranges into `template_string` for static parts
33
+    /// Ranges into `template_string` for the static parts
33
     static_parts: Vec<::std::ops::Range<usize>>,
34
     static_parts: Vec<::std::ops::Range<usize>>,
34
     /// Kinds of placeholders between the static parts
35
     /// Kinds of placeholders between the static parts
35
     placeholders: Vec<Placeholder>,
36
     placeholders: Vec<Placeholder>,