Skip to content

Commit 4b7f75d

Browse files
authored
Avoid duplicate Swift symbols from apple-cf (#159)
* swift: avoid CoreMedia bridge symbol collisions * examples: satisfy Rust 1.97 clippy
1 parent 744cf43 commit 4b7f75d

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

examples/16_full_metal_app/ui.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl VertexBufferBuilder {
9999
("Select a Source to Begin".to_string(), [0.6, 0.5, 0.7, 1.0])
100100
} else if has_source {
101101
let display = if source_name.len() > 30 {
102-
format!("{}...", &source_name.chars().take(27).collect::<String>())
102+
format!("{}...", source_name.chars().take(27).collect::<String>())
103103
} else {
104104
source_name.to_string()
105105
};
@@ -176,7 +176,7 @@ impl VertexBufferBuilder {
176176
if !format_info.is_empty() {
177177
// Truncate if too long
178178
let display_info = if format_info.len() > 40 {
179-
format!("{}...", &format_info.chars().take(37).collect::<String>())
179+
format!("{}...", format_info.chars().take(37).collect::<String>())
180180
} else {
181181
format_info.to_string()
182182
};
@@ -293,7 +293,7 @@ impl VertexBufferBuilder {
293293
self.text(font, name, text_x, text_y, scale, name_color);
294294

295295
let t: String = if value.len() > 12 {
296-
format!("{}...", &value.chars().take(9).collect::<String>())
296+
format!("{}...", value.chars().take(9).collect::<String>())
297297
} else {
298298
value
299299
};

swift-bridge/Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import PackageDescription
66
//
77
// Note: CoreGraphicsBridge / CoreVideoBridge / IOSurfaceBridge / DispatchBridge
88
// targets that used to live here were extracted into apple-cf-rs's bridge.
9-
// CoreMediaBridge here keeps only the SCStreamFrameInfo attachment readers
10-
// and a few generic accessors with frame-info-specific signatures
11-
// everything else comes from apple-cf's CoreMediaBridge target.
9+
// ScreenCaptureKitCoreMediaBridge keeps only the SCStreamFrameInfo attachment
10+
// readers and a few generic accessors with frame-info-specific signatures.
11+
// Generic CoreMedia bindings come from apple-cf's CoreMediaBridge target.
1212

1313
let package = Package(
1414
name: "ScreenCaptureKitBridge",
@@ -25,14 +25,14 @@ let package = Package(
2525
// Main ScreenCaptureKit bindings.
2626
.target(
2727
name: "ScreenCaptureKitBridge",
28-
dependencies: ["CoreMediaBridge", "MetalBridge"],
28+
dependencies: ["ScreenCaptureKitCoreMediaBridge", "MetalBridge"],
2929
path: "Sources/ScreenCaptureKitBridge"),
3030
// CoreMedia bindings — only the SCStreamFrameInfo attachment readers
3131
// and SC-specific sample-buffer helpers. Generic CMSampleBuffer /
3232
// CMBlockBuffer / CMFormatDescription accessors come from
3333
// apple-cf-rs's CoreMediaBridge.
3434
.target(
35-
name: "CoreMediaBridge",
35+
name: "ScreenCaptureKitCoreMediaBridge",
3636
path: "Sources/CoreMedia"),
3737
// Metal framework bindings (MTLDevice, MTLTexture, etc.) — apple-cf
3838
// doesn't provide a metal module yet so this stays local.

0 commit comments

Comments
 (0)