Skip to content

Commit d77f32c

Browse files
committed
use rather than
1 parent ea8b5f1 commit d77f32c

2 files changed

Lines changed: 3 additions & 14 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "posthog-rs"
33
license = "MIT"
4-
version = "0.3.4"
4+
version = "0.3.5"
55
authors = ["christos <christos@openquery.io>"]
66
description = "An unofficial Rust client for Posthog (https://posthog.com/)."
77
repository = "https://github.com/openquery-io/posthog-rs"

src/event.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl InnerEvent {
9393

9494
// Add $lib_name and $lib_version to the properties
9595
properties.insert(
96-
"$lib_name".into(),
96+
"$lib".into(),
9797
serde_json::Value::String("posthog-rs".into()),
9898
);
9999

@@ -159,19 +159,8 @@ pub mod tests {
159159
// Assert
160160
let props = &inner_event.properties;
161161
assert_eq!(
162-
props.get("$lib_name"),
162+
props.get("$lib"),
163163
Some(&serde_json::Value::String("posthog-rs".to_string()))
164164
);
165165
}
166-
167-
#[test]
168-
fn event_structure_is_correct() {
169-
let mut event = Event::new("unit test event", "1234");
170-
event.insert_prop("key1", "value1").unwrap();
171-
let api_key = "test_api_key".to_string();
172-
let inner_event = InnerEvent::new(event, api_key);
173-
let payload = serde_json::to_string(&inner_event).unwrap();
174-
175-
println!("{}", payload);
176-
}
177166
}

0 commit comments

Comments
 (0)