migrate ra_cli to the new rowan

This commit is contained in:
Aleksey Kladov 2019-07-19 13:16:30 +03:00
parent f1abc7bdc6
commit cf932181cf

View file

@ -7,7 +7,7 @@ use clap::{App, Arg, SubCommand};
use flexi_logger::Logger;
use ra_ide_api::{file_structure, Analysis};
use ra_prof::profile;
use ra_syntax::{AstNode, SourceFile, TreeArc};
use ra_syntax::{AstNode, SourceFile};
type Result<T> = std::result::Result<T, Box<dyn Error + Send + Sync>>;
@ -100,9 +100,9 @@ fn main() -> Result<()> {
Ok(())
}
fn file() -> Result<TreeArc<SourceFile>> {
fn file() -> Result<SourceFile> {
let text = read_stdin()?;
Ok(SourceFile::parse(&text).tree().to_owned())
Ok(SourceFile::parse(&text).tree())
}
fn read_stdin() -> Result<String> {