Skip to content

Commit 52a1c8d

Browse files
authored
Merge pull request #295 from MikeFalcon77/chore/update_docx-rust
chore(file_parser): switch to docx-rust from crates.io (instead of custom package)
2 parents 0bbbac7 + 6038381 commit 52a1c8d

5 files changed

Lines changed: 18 additions & 11 deletions

File tree

Cargo.lock

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ mime = "0.3"
353353
# Document parsing libraries
354354
tl = "0.7"
355355
pdf-extract = "0.10"
356+
docx-rust = "0.1.11"
356357

357358
# Additional testing utilities
358359
tokio-test = "0.4"

libs/modkit/src/client_hub.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ mod tests {
376376
#[test]
377377
fn try_get_scoped_returns_some_on_hit() {
378378
let hub = ClientHub::new();
379-
let scope = ClientScope::gts_id("gts.x.core.modkit.plugins.v1~x.core.tenant_resolver.plugin.v1~contoso.app._.plugin.v1.0");
379+
let scope = ClientScope::gts_id(
380+
"gts.x.core.modkit.plugins.v1~x.core.tenant_resolver.plugin.v1~contoso.app._.plugin.v1.0",
381+
);
380382
hub.register_scoped::<str>(scope.clone(), Arc::from("scoped"));
381383

382384
let got = hub.try_get_scoped::<str>(&scope);
@@ -386,7 +388,9 @@ mod tests {
386388
#[test]
387389
fn try_get_scoped_returns_none_on_miss() {
388390
let hub = ClientHub::new();
389-
let scope = ClientScope::gts_id("gts.x.core.modkit.plugins.v1~x.core.tenant_resolver.plugin.v1~fabrikam.app._.plugin.v1.0");
391+
let scope = ClientScope::gts_id(
392+
"gts.x.core.modkit.plugins.v1~x.core.tenant_resolver.plugin.v1~fabrikam.app._.plugin.v1.0",
393+
);
390394

391395
let got = hub.try_get_scoped::<str>(&scope);
392396
assert!(got.is_none());

libs/modkit/src/plugins/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ impl GtsPluginSelector {
8989
#[cfg_attr(coverage_nightly, coverage(off))]
9090
mod tests {
9191
use super::*;
92-
use std::sync::atomic::{AtomicUsize, Ordering};
9392
use std::sync::Arc;
93+
use std::sync::atomic::{AtomicUsize, Ordering};
9494

9595
#[tokio::test]
9696
async fn resolve_called_once_returns_same_str() {

modules/file_parser/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ tempfile = { workspace = true }
5656
# Document parsing libraries
5757
tl = { workspace = true }
5858
pdf-extract = { workspace = true }
59-
# Using local docx-rust with fixes for XML parsing issues
60-
docx-rust = { git = "https://github.com/modcrafter77/docx-rs", branch = "master" }
6159

6260
# MIME type parsing
6361
mime = { workspace = true }
6462

63+
docx-rust = { workspace = true }
64+
6565
# Local dependencies
6666
modkit = { path = "../../libs/modkit" }
6767
modkit-auth = { path = "../../libs/modkit-auth" }
68+

0 commit comments

Comments
 (0)