Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #1461 Remove redundant c8y-config-plugin code #1531

Conversation

albinsuresh
Copy link
Contributor

Proposed changes

  • Remove redundant c8y-config-plugin code for processing updates to c8y-conifg-plugin.toml
  • Move tests to dedicated module

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@albinsuresh albinsuresh force-pushed the improvement/1461/remove-redundant-c8y-config-plugin-code branch from 4312d49 to f0873d9 Compare October 27, 2022 06:40
@@ -484,949 +480,3 @@ files = [
)?;
Ok(())
}

#[cfg(test)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests were moved to a dedicated tests.rs module.

@@ -73,6 +74,12 @@ impl TryFrom<Topic> for C8yTopic {
}
}

impl From<C8yTopic> for TopicFilter {
fn from(val: C8yTopic) -> Self {
val.to_string().as_str().try_into().expect("infallible")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting pattern, never thought to expect("infallible") before

@albinsuresh albinsuresh merged commit a8afc3c into thin-edge:main Oct 27, 2022
@albinsuresh albinsuresh deleted the improvement/1461/remove-redundant-c8y-config-plugin-code branch November 8, 2022 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants