diff options
| author | Alexander Regueiro <alex@noldorin.com> | 2019-02-19 02:56:42 +0000 |
|---|---|---|
| committer | Seiichi Uchida <seuchida@gmail.com> | 2019-02-19 11:56:42 +0900 |
| commit | 7a3b7c9275f057aa1d71ea7516ef33a44bdffb7f (patch) | |
| tree | 009cfe505aeb4da3150d487f1d676020549be362 /src/patterns.rs | |
| parent | 74755e86ab96ca8eaf9e3cd75a22e83edbfe8d43 (diff) | |
Various cosmetic improvements (#3403)
Diffstat (limited to 'src/patterns.rs')
| -rw-r--r-- | src/patterns.rs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/patterns.rs b/src/patterns.rs index 956ce56bdf1..2140b8d870f 100644 --- a/src/patterns.rs +++ b/src/patterns.rs @@ -1,13 +1,3 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - use syntax::ast::{self, BindingMode, FieldPat, Pat, PatKind, RangeEnd, RangeSyntax}; use syntax::ptr; use syntax::source_map::{self, BytePos, Span}; @@ -29,7 +19,8 @@ use crate::spanned::Spanned; use crate::types::{rewrite_path, PathContext}; use crate::utils::{format_mutability, mk_sp, rewrite_ident}; -/// Returns true if the given pattern is short. A short pattern is defined by the following grammar: +/// Returns `true` if the given pattern is "short". +/// A short pattern is defined by the following grammar: /// /// [small, ntp]: /// - single token @@ -152,7 +143,7 @@ impl Rewrite for Pat { let pats: Option<Vec<String>> = prefix.chain(slice_pat.into_iter()).chain(suffix).collect(); - // Check that all the rewrites succeeded, and if not return None. + // Check that all the rewrites succeeded, and if not return `None`. let pats = pats?; // Unwrap all the sub-strings and join them with commas. |
