Skip to content

refactor: update dependencies and examples#17

Merged
ok-nick merged 2 commits into
ok-nick:update-depsfrom
ajaykumargdr:update-deps
Sep 7, 2025
Merged

refactor: update dependencies and examples#17
ok-nick merged 2 commits into
ok-nick:update-depsfrom
ajaykumargdr:update-deps

Conversation

@ajaykumargdr

Copy link
Copy Markdown
Contributor

Description

This PR updates the Windows crate and aligns examples with the latest APIs. The cloud-mirror example has been fully tested, while the sftp example now compiles but remains untested.

Changes

  • Bump Windows dependency to the latest version
  • Fix sync root ID parsing
  • Refactor and update dependencies of cloud-mirror example.
  • Fix sftp example compilation issues

- Updated windows crate to latest
- Update command module to use latest operation parameter structures
- Refactor examples to use latest apis and update callback functions
- Fix parsing SyncRootId to components

@ok-nick ok-nick left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you the contributions! Just a few comments.

Comment thread examples/cloud-mirror/src/main.rs Outdated
Comment thread src/root/sync_root.rs Outdated
- Removed unwanted generic parameter from `Placeholder::create`
- Improve `SyncRootId::to_components`
- Add test cases to test `SyncRootId::to_components`

Co-authored-by: ok-nick nick.libraries@gmail.com

@ok-nick ok-nick left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks again for these changes.

Comment thread src/root/sync_root.rs
Comment on lines +141 to +153
let mut parts = self.0.splitn(3, |&byte| byte == Self::SEPARATOR);

// Pattern match on the iterator to safely extract the three parts.
if let (Some(first), Some(second), Some(third)) = (parts.next(), parts.next(), parts.next())
{
Ok((
U16Str::from_slice(first),
U16Str::from_slice(second),
U16Str::from_slice(third),
))
} else {
Err(Foundation::ERROR_INVALID_DATA.into())
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nice, this is cool stuff.

Comment thread src/root/sync_root.rs
}
}

#[cfg(test)]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is great as well, thank you.

@ok-nick ok-nick merged commit 176d1ed into ok-nick:update-deps Sep 7, 2025
2 checks passed
ok-nick added a commit that referenced this pull request Sep 7, 2025
* build: update dependencies

* refactor: update dependencies and examples (#17)

* refactor: update windows dependency and refactor examples

- Updated windows crate to latest
- Update command module to use latest operation parameter structures
- Refactor examples to use latest apis and update callback functions
- Fix parsing SyncRootId to components

* refactor: `Placeholder::create` and `SyncRootId::to_components`

- Removed unwanted generic parameter from `Placeholder::create`
- Improve `SyncRootId::to_components`
- Add test cases to test `SyncRootId::to_components`

Co-authored-by: ok-nick nick.libraries@gmail.com

---------

Co-authored-by: Ajay Kumar M <ajaykumarncas@gmail.com>
@ajaykumargdr ajaykumargdr deleted the update-deps branch September 8, 2025 10:11
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.

2 participants