J
J
99 Joined 6 days ago
How to get epoch time in Rust?

To get the current epoch time in Rust you can use SystemTime::now() along with .duration_since and [UNIX_EPOCH]...

0 votes Posted 2 days ago
J
J
99
Should I write string function arguments as `&str`, `String`, `AsRef<str>`, or `Into<String>` in Rust?

Use this when you need to read the string (or parts of it), but don't need to own it. Pros: - Fast, no allocation or transfer - Explicit Cons: - Caller must explicitly pass a reference (greet_str(owned) will throw a compile-time error) - You can't take owner...

1 vote Posted 2 days ago
J
J
99
Font Size Inherit - Tailwind CSS

You can achieve this through an arbitrary value with the length type-cast as specified by the relevant Tailwind Documentation.

In Use:

2 votes Posted 5 days ago
J
J
99
What is the difference between `gap-x` and `space-x` in TailwindCSS?

Gap is a fundamental CSS property for grid and flex layouts only. gap-* is just shorthand for gap: *;. It spaces adjacent elements out by the specified length, in either one (gap-x/y-*), or both dimensions...

2 votes Posted 6 days ago
J
J
99