chore: fix typo (#524)

This commit is contained in:
SSebo
2022-11-16 11:53:25 +08:00
committed by GitHub
parent 173a8f67a1
commit 29ad16d048
3 changed files with 6 additions and 6 deletions

View File

@@ -34,7 +34,7 @@ impl<'a, E: ErrorExt + ?Sized> fmt::Debug for DebugFormat<'a, E> {
write!(f, " Caused by: {:?}", source)?;
}
if let Some(backtrace) = self.0.backtrace_opt() {
// Add a newline to seperate causes and backtrace.
// Add a newline to separate causes and backtrace.
write!(f, "\nBacktrace:\n{}", backtrace)?;
}

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//! promethues protcol supportings
//! prometheus protocol supportings
use std::cmp::Ordering;
use std::collections::{BTreeMap, HashMap};
use std::hash::{Hash, Hasher};
@@ -77,7 +77,7 @@ pub fn query_to_sql(db: &str, q: &Query) -> Result<(String, String)> {
let value = &m.value;
let m_type =
MatcherType::from_i32(m.r#type).context(error::InvalidPromRemoteRequestSnafu {
msg: format!("invaid LabelMatcher type: {}", m.r#type),
msg: format!("invalid LabelMatcher type: {}", m.r#type),
})?;
match m_type {
@@ -87,11 +87,11 @@ pub fn query_to_sql(db: &str, q: &Query) -> Result<(String, String)> {
MatcherType::Neq => {
conditions.push(format!("{}!='{}'", name, value));
}
// Case senstive regexp match
// Case sensitive regexp match
MatcherType::Re => {
conditions.push(format!("{}~'{}'", name, value));
}
// Case senstive regexp not match
// Case sensitive regexp not match
MatcherType::Nre => {
conditions.push(format!("{}!~'{}'", name, value));
}

View File

@@ -158,7 +158,7 @@ impl<'a> ParserContext<'a> {
}));
}
// SHOW TABLES [in | FROM] [DATABSE]
// SHOW TABLES [in | FROM] [DATABASE]
Token::Word(w) => match w.keyword {
Keyword::IN | Keyword::FROM => {
self.parser.next_token();