Skip to content

Commit 93f0fd6

Browse files
authored
Merge pull request #38 from intel/fix-lints
Fix some linting warnings
2 parents 7c66091 + df0e547 commit 93f0fd6

File tree

7 files changed

+6
-6
lines changed

7 files changed

+6
-6
lines changed

.github/workflows/scans.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
shell: bash
3939
if: ${{ success() || failure() }}
4040
run: |
41+
rm Cargo.lock
4142
cargo install cargo-outdated
4243
cargo outdated --version
4344
set -o pipefail

src/actions/analysis_storage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl AnalysisStorage {
230230
pub fn get_file_contexts(&self, path: &CanonPath)
231231
-> HashSet<Option<CanonPath>> {
232232
if let Some(deps) = self.dependencies.get(path) {
233-
return deps.keys().cloned().collect()
233+
deps.keys().cloned().collect()
234234
} else {
235235
vec![None].into_iter().collect()
236236
}

src/analysis/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ impl DeviceAnalysis {
652652
}
653653

654654
fn resolved_to_symbol<'t, 'c>(&'c self, obj: DMLResolvedObject<'t, 'c>)
655-
-> Option<Vec<&SymbolRef>> {
655+
-> Option<Vec<&'c SymbolRef>> {
656656
match obj {
657657
DMLResolvedObject::CompObject(comp) =>
658658
self.symbol_info.object_symbols.get(&comp.key)

src/analysis/reference.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl std::fmt::Display for Reference {
142142
}
143143

144144
impl Reference {
145-
pub fn as_variable_ref<'t>(&'t self) -> Option<&VariableReference> {
145+
pub fn as_variable_ref(&self) -> Option<&VariableReference> {
146146
match self {
147147
Reference::Variable(var) => Some(var),
148148
_ => None,

src/analysis/templating/objects.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ impl DMLCompositeObject {
869869
}
870870

871871
pub fn parameters<'t>(&'t self)
872-
-> impl Iterator<Item=&'t DMLParameter> + '_ {
872+
-> impl Iterator<Item=&'t DMLParameter> + 't {
873873
self.components.values().filter_map(
874874
|c| if let DMLObject::ShallowObject(
875875
DMLShallowObject {

src/lint/rules/spacing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl SpBracesArgs {
4949
if declarations.is_empty() {
5050
return None;
5151
}
52-
return Some(SpBracesArgs {
52+
Some(SpBracesArgs {
5353
body_start: declarations.first().unwrap().range(),
5454
body_end: declarations.last().unwrap().range(),
5555
lbrace: l_brace.range(),

src/server/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ pub mod message;
6060
const NOT_INITIALIZED_CODE: i32 = -32002;
6161

6262
/// Runs the DML Language Server.
63-
6463
pub fn run_server(vfs: Arc<Vfs>) -> i32 {
6564
debug!("Language Server starting up. Version: {}", version());
6665
let config = Arc::new(Mutex::new(Config::default()));

0 commit comments

Comments
 (0)