mirror of
https://github.com/house-of-vanity/mystem-rs.git
synced 2025-07-06 21:24:07 +00:00
Fix warnings.
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
extern crate mystem;
|
extern crate mystem;
|
||||||
|
|
||||||
|
#[allow(unused_must_use)]
|
||||||
fn main() -> Result<(), mystem::AppError> {
|
fn main() -> Result<(), mystem::AppError> {
|
||||||
let mut instance = mystem::MyStem::new()?;
|
let mut instance = mystem::MyStem::new()?;
|
||||||
for stem in instance.stemming("Связался с лучшим - подохни как все.".into())?
|
for stem in instance.stemming("Связался с лучшим - подохни как все.".into())?
|
||||||
@ -7,7 +8,6 @@ fn main() -> Result<(), mystem::AppError> {
|
|||||||
println!("{} is a lexeme of {}", stem.lex, stem.text)
|
println!("{} is a lexeme of {}", stem.lex, stem.text)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unused_must_use)]
|
|
||||||
instance.terminate();
|
instance.terminate();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ use std::str::FromStr;
|
|||||||
use subprocess::{Popen, PopenConfig, PopenError, Redirection};
|
use subprocess::{Popen, PopenConfig, PopenError, Redirection};
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate log;
|
extern crate log;
|
||||||
use std::collections::{HashMap, HashSet};
|
|
||||||
|
|
||||||
pub use error::*;
|
pub use error::*;
|
||||||
pub use grammems::*;
|
pub use grammems::*;
|
||||||
@ -90,6 +89,7 @@ impl MyStem {
|
|||||||
/// // как is a lexeme of как
|
/// // как is a lexeme of как
|
||||||
/// // все is a lexeme of все
|
/// // все is a lexeme of все
|
||||||
/// ```
|
/// ```
|
||||||
|
#[allow(unused_must_use)]
|
||||||
pub fn stemming(&mut self, text: String) -> Result<Vec<Stemming>, AppError> {
|
pub fn stemming(&mut self, text: String) -> Result<Vec<Stemming>, AppError> {
|
||||||
if let Some(exit_status) = self.process.poll() {
|
if let Some(exit_status) = self.process.poll() {
|
||||||
warn!(
|
warn!(
|
||||||
|
Reference in New Issue
Block a user