Skip to content

Commit

Permalink
Wip/wdanilo/widgets 182746060 (#3678)
Browse files Browse the repository at this point in the history
  • Loading branch information
wdanilo authored Oct 4, 2022
1 parent 0d74ab6 commit 61546a7
Show file tree
Hide file tree
Showing 322 changed files with 10,518 additions and 5,832 deletions.
70 changes: 56 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/gui/analytics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// === Standard Linter Configuration ===
#![deny(non_ascii_idents)]
#![warn(unsafe_code)]
#![allow(clippy::let_and_return)]
// === Non-Standard Linter Configuration ===
#![warn(missing_docs)]
#![warn(trivial_casts)]
Expand Down
1 change: 1 addition & 0 deletions app/gui/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// === Standard Linter Configuration ===
#![deny(non_ascii_idents)]
#![warn(unsafe_code)]
#![allow(clippy::let_and_return)]
// === Non-Standard Linter Configuration ===
#![warn(trivial_casts)]
#![warn(trivial_numeric_casts)]
Expand Down
1 change: 1 addition & 0 deletions app/gui/controller/double-representation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// === Standard Linter Configuration ===
#![deny(non_ascii_idents)]
#![warn(unsafe_code)]
#![allow(clippy::let_and_return)]
// === Non-Standard Linter Configuration ===
#![warn(missing_docs)]
#![warn(trivial_casts)]
Expand Down
4 changes: 2 additions & 2 deletions app/gui/controller/double-representation/src/module.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Code for module-level double representation processing.
use crate::prelude::*;
use enso_text::unit::*;
use enso_text::index::*;

use crate::alias_analysis;
use crate::definition;
Expand Down Expand Up @@ -828,7 +828,7 @@ pub fn lookup_method(
pub fn definition_span(
ast: &known::Module,
id: &definition::Id,
) -> FallibleResult<enso_text::Range<Bytes>> {
) -> FallibleResult<enso_text::Range<Byte>> {
let location = locate(ast, id)?;
ast.range_of_descendant_at(&location.crumbs)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ mod tests {

impl Case {
fn run(&self, parser: &Parser) {
let logger = DefaultTraceLogger::new("Collapsing_Test");
let ast = parser.parse_module(self.initial_method_code, default()).unwrap();
let main = module::locate_child(&ast, &self.refactored_name).unwrap();
let graph = graph::GraphInfo::from_definition(main.item.clone());
Expand All @@ -417,14 +416,14 @@ mod tests {
let new_method = collapsed.new_method.ast(0, parser).unwrap();
let placement = module::Placement::Before(self.refactored_name.clone());
let new_main = &collapsed.updated_definition.ast;
info!(logger, "Generated method:\n{new_method}");
info!(logger, "Updated method:\n{new_method}");
info!("Generated method:\n{new_method}");
info!("Updated method:\n{new_method}");
let mut module = module::Info { ast: ast.clone_ref() };
let main_crumb = Crumb::from(main.crumb());
module.ast = module.ast.set(&main_crumb, new_main.ast().clone()).unwrap();
module.add_method(collapsed.new_method, placement, parser).unwrap();
ast::test_utils::assert_unique_ids(module.ast.as_ref());
info!(logger, "Updated method:\n{&module.ast}");
info!("Updated method:\n{}", &module.ast);
assert_eq!(new_method.repr(), self.expected_generated);
assert_eq!(new_main.repr(), self.expected_refactored);
};
Expand Down
Loading

0 comments on commit 61546a7

Please sign in to comment.