MCPcopy Create free account
hub / github.com/chanced/jsonptr / replace_token

Function replace_token

src/pointer.rs:1613–1623  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1611
1612 #[test]
1613 fn replace_token() {
1614 let mut ptr = PointerBuf::try_from("/test/token").unwrap();
1615
1616 let res = ptr.replace(0, "new");
1617 assert!(res.is_ok());
1618 assert_eq!(ptr, "/new/token");
1619
1620 let res = ptr.replace(3, "invalid");
1621
1622 assert!(res.is_err());
1623 }
1624
1625 #[test]
1626 fn push_pop_front() {

Callers

nothing calls this directly

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected